2023-09-23 13:35:35 +02:00
|
|
|
|
# Edit this configuration file to define what should be installed on
|
|
|
|
|
# your system. Help is available in the configuration.nix(5) man page
|
|
|
|
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
|
|
|
{
|
|
|
|
|
config,
|
|
|
|
|
lib,
|
|
|
|
|
pkgs,
|
|
|
|
|
...
|
|
|
|
|
}: {
|
|
|
|
|
imports = [
|
|
|
|
|
# Include the results of the hardware scan.
|
|
|
|
|
./hardware-configuration.nix
|
|
|
|
|
./home.nix
|
|
|
|
|
./secrets.nix
|
|
|
|
|
];
|
|
|
|
|
|
2023-09-29 17:28:16 +02:00
|
|
|
|
hardware.amdgpu.opencl = false;
|
|
|
|
|
|
2023-09-23 13:35:35 +02:00
|
|
|
|
boot.kernelPackages = pkgs.linuxPackages;
|
|
|
|
|
|
|
|
|
|
# Use the systemd-boot EFI boot loader.
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
|
2023-11-27 17:47:25 +01:00
|
|
|
|
# boot.initrd.systemd.enable = true;
|
|
|
|
|
# boot.plymouth.enable = true;
|
|
|
|
|
# boot.kernelParams = ["quiet"];
|
2023-11-23 12:01:03 +01:00
|
|
|
|
|
2023-09-23 13:35:35 +02:00
|
|
|
|
boot.initrd.secrets = {
|
|
|
|
|
"/crypto_keyfile.bin" = null;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
boot.tmp.useTmpfs = true;
|
|
|
|
|
|
|
|
|
|
services.btrfs = {
|
|
|
|
|
autoScrub = {
|
|
|
|
|
enable = true;
|
|
|
|
|
fileSystems = ["/"];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
networking.hostName = "hephaestus"; # Define your hostname.
|
|
|
|
|
networking.domain = "alarsyo.net";
|
|
|
|
|
|
|
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
|
|
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "Europe/Paris";
|
|
|
|
|
|
|
|
|
|
# List services that you want to enable:
|
|
|
|
|
my.services = {
|
|
|
|
|
tailscale.enable = true;
|
|
|
|
|
pipewire.enable = true;
|
2023-09-26 17:39:47 +02:00
|
|
|
|
|
|
|
|
|
restic-backup = {
|
|
|
|
|
enable = true;
|
|
|
|
|
repo = "b2:hephaestus-backup";
|
|
|
|
|
passwordFile = config.age.secrets."restic-backup/hephaestus-password".path;
|
|
|
|
|
environmentFile = config.age.secrets."restic-backup/hephaestus-credentials".path;
|
|
|
|
|
|
|
|
|
|
timerConfig = {
|
|
|
|
|
OnCalendar = "*-*-* 13:00:00"; # laptop only gets used during the day
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
paths = [
|
|
|
|
|
"/home/alarsyo"
|
|
|
|
|
];
|
|
|
|
|
exclude = [
|
|
|
|
|
"/home/alarsyo/Downloads"
|
|
|
|
|
|
|
|
|
|
# Rust builds using half my storage capacity
|
|
|
|
|
"/home/alarsyo/**/target"
|
|
|
|
|
"/home/alarsyo/work/rust/build"
|
|
|
|
|
|
|
|
|
|
# don't backup nixpkgs
|
|
|
|
|
"/home/alarsyo/work/nixpkgs"
|
|
|
|
|
|
|
|
|
|
"/home/alarsyo/go"
|
|
|
|
|
|
|
|
|
|
# C build crap
|
|
|
|
|
"*.a"
|
|
|
|
|
"*.o"
|
|
|
|
|
"*.so"
|
|
|
|
|
|
|
|
|
|
".direnv"
|
|
|
|
|
|
|
|
|
|
# test vms
|
|
|
|
|
"*.qcow2"
|
|
|
|
|
|
|
|
|
|
# secrets stay offline
|
|
|
|
|
"/home/alarsyo/**/secrets"
|
|
|
|
|
|
|
|
|
|
# ignore all dotfiles as .config and .cache can become quite big
|
|
|
|
|
"/home/alarsyo/.*"
|
|
|
|
|
];
|
|
|
|
|
};
|
2023-09-23 13:35:35 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
virtualisation.docker.enable = true;
|
|
|
|
|
virtualisation.libvirtd.enable = true;
|
|
|
|
|
programs.dconf.enable = true;
|
|
|
|
|
|
|
|
|
|
services = {
|
|
|
|
|
tlp = {
|
2023-11-27 17:47:01 +01:00
|
|
|
|
enable = true;
|
2023-09-23 13:35:35 +02:00
|
|
|
|
settings = {
|
|
|
|
|
START_CHARGE_THRESH_BAT0 = 70;
|
|
|
|
|
STOP_CHARGE_THRESH_BAT0 = 80;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
fwupd.enable = true;
|
|
|
|
|
openssh.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
my.gui.enable = true;
|
|
|
|
|
my.displayManager.sddm.enable = lib.mkForce false;
|
|
|
|
|
|
|
|
|
|
hardware.bluetooth = {
|
|
|
|
|
enable = true;
|
|
|
|
|
powerOnBoot = false;
|
|
|
|
|
settings.General.Experimental = true;
|
|
|
|
|
};
|
|
|
|
|
|
2023-09-25 15:50:30 +02:00
|
|
|
|
# Select internationalisation properties.
|
2023-09-23 13:35:35 +02:00
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
|
|
|
|
|
|
i18n.extraLocaleSettings = {
|
|
|
|
|
LC_ADDRESS = "fr_FR.UTF-8";
|
|
|
|
|
LC_IDENTIFICATION = "fr_FR.UTF-8";
|
|
|
|
|
LC_MEASUREMENT = "fr_FR.UTF-8";
|
|
|
|
|
LC_MONETARY = "fr_FR.UTF-8";
|
|
|
|
|
LC_NAME = "fr_FR.UTF-8";
|
|
|
|
|
LC_PAPER = "fr_FR.UTF-8";
|
|
|
|
|
LC_TELEPHONE = "fr_FR.UTF-8";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Enable the X11 windowing system.
|
|
|
|
|
services.xserver.enable = true;
|
|
|
|
|
|
|
|
|
|
# Enable the KDE Plasma Desktop Environment.
|
|
|
|
|
services.xserver.displayManager.sddm.enable = true;
|
|
|
|
|
services.xserver.desktopManager.plasma5.enable = true;
|
2023-11-27 17:47:01 +01:00
|
|
|
|
services.power-profiles-daemon.enable = false;
|
2023-09-23 13:35:35 +02:00
|
|
|
|
|
|
|
|
|
# Configure console keymap
|
|
|
|
|
console.keyMap = "us";
|
2023-09-24 17:19:49 +02:00
|
|
|
|
|
|
|
|
|
programs.light.enable = true;
|
2023-09-23 13:35:35 +02:00
|
|
|
|
}
|