2023-12-29 19:47:57 +01:00
|
|
|
{ config, ... }:
|
2022-12-18 17:01:34 +01:00
|
|
|
{
|
2022-12-29 20:48:40 +01:00
|
|
|
|
2022-12-18 17:07:40 +01:00
|
|
|
imports =
|
|
|
|
[
|
|
|
|
./hardware-configuration.nix
|
2023-11-07 19:56:10 +01:00
|
|
|
./modules/backup
|
2023-11-24 09:57:15 +01:00
|
|
|
./modules/graphics
|
2023-04-06 11:00:53 +02:00
|
|
|
./modules/greetd
|
2023-11-24 09:57:15 +01:00
|
|
|
./modules/networks
|
2023-12-01 15:07:47 +01:00
|
|
|
./modules/printing
|
2023-11-24 09:57:15 +01:00
|
|
|
./modules/security
|
|
|
|
./modules/sound
|
2023-07-03 10:19:14 +02:00
|
|
|
./modules/virtualisation
|
2022-12-18 17:07:40 +01:00
|
|
|
];
|
|
|
|
|
2024-01-04 17:26:11 +01:00
|
|
|
# nixpkgs.hostPlatform = {
|
|
|
|
# gcc.arch = "tigerlake";
|
|
|
|
# gcc.tune = "tigerlake";
|
|
|
|
# system = "x86_64-linux";
|
|
|
|
# };
|
2024-01-04 00:13:46 +01:00
|
|
|
|
|
|
|
nix.settings.system-features = [ "gccarch-tigerlake" ];
|
|
|
|
|
2022-12-18 17:07:40 +01:00
|
|
|
# Use the systemd-boot EFI boot loader.
|
2023-01-28 14:53:23 +01:00
|
|
|
boot = {
|
2023-12-01 15:07:47 +01:00
|
|
|
kernelModules = [ "v4l2loopback" ];
|
2023-08-02 18:04:26 +02:00
|
|
|
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
2023-12-01 15:07:47 +01:00
|
|
|
extraModulePackages = [
|
|
|
|
config.boot.kernelPackages.v4l2loopback
|
|
|
|
];
|
|
|
|
extraModprobeConfig = ''
|
|
|
|
options v4l2loopback exclusive_caps=1 card_label="Virtual Camera"
|
|
|
|
'';
|
2023-04-16 13:43:30 +02:00
|
|
|
tmp.useTmpfs = true;
|
2023-01-28 14:53:23 +01:00
|
|
|
};
|
2022-12-18 17:07:40 +01:00
|
|
|
|
2023-08-02 20:28:22 +02:00
|
|
|
environment.persistence."/nix/persist/system" = {
|
|
|
|
directories = [
|
|
|
|
"/etc/nixos" # bind mounted from /nix/persist/system/etc/nixos to /etc/nixos
|
|
|
|
"/etc/ssh"
|
|
|
|
"/etc/secureboot"
|
|
|
|
"/root/.ssh"
|
2023-08-06 22:24:01 +02:00
|
|
|
"/root/.borgmatic"
|
2023-08-03 13:30:40 +02:00
|
|
|
"/root/.local/share/zsh"
|
2023-08-02 20:28:22 +02:00
|
|
|
];
|
|
|
|
files = [
|
|
|
|
"/etc/machine-id"
|
|
|
|
];
|
|
|
|
};
|
2023-05-20 16:21:20 +02:00
|
|
|
|
2022-12-18 17:07:40 +01:00
|
|
|
time.timeZone = "Europe/Berlin";
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
2023-01-21 14:44:23 +01:00
|
|
|
|
2023-11-24 09:57:15 +01:00
|
|
|
console.keyMap = "dvorak";
|
2022-12-31 12:28:53 +01:00
|
|
|
|
2022-12-19 19:30:32 +01:00
|
|
|
|
|
|
|
services = {
|
2022-12-27 18:21:33 +01:00
|
|
|
blueman.enable = true; # bluetooth
|
|
|
|
devmon.enable = true; # automount stuff
|
2023-12-29 19:40:10 +01:00
|
|
|
upower.enable = true;
|
2023-04-06 11:00:53 +02:00
|
|
|
avahi = {
|
2023-03-06 18:07:49 +01:00
|
|
|
enable = true;
|
2023-12-17 17:27:20 +01:00
|
|
|
nssmdns4 = true;
|
2023-03-06 18:07:49 +01:00
|
|
|
};
|
2023-03-04 19:56:45 +01:00
|
|
|
fwupd.enable = true; # firmware updates
|
2023-08-02 20:28:22 +02:00
|
|
|
zfs.autoScrub.enable = true;
|
2022-12-19 19:30:32 +01:00
|
|
|
};
|
2023-11-24 09:57:15 +01:00
|
|
|
hardware.bluetooth.enable = true;
|
2023-02-14 21:50:36 +01:00
|
|
|
|
2023-02-28 20:48:06 +01:00
|
|
|
services.logind = {
|
2023-03-06 15:05:35 +01:00
|
|
|
lidSwitch = "suspend-then-hibernate";
|
2023-12-12 17:43:16 +01:00
|
|
|
lidSwitchDocked = "suspend";
|
2023-03-06 15:05:35 +01:00
|
|
|
lidSwitchExternalPower = "suspend";
|
|
|
|
extraConfig = ''
|
|
|
|
HandlePowerKey = ignore
|
|
|
|
'';
|
|
|
|
};
|
2023-11-24 09:57:15 +01:00
|
|
|
|
2023-03-06 15:05:35 +01:00
|
|
|
services.tlp = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
START_CHARGE_THRESH_BAT0 = 70;
|
2023-04-24 15:15:01 +02:00
|
|
|
STOP_CHARGE_THRESH_BAT0 = 90;
|
2023-12-29 19:40:10 +01:00
|
|
|
RESTORE_DEVICE_STATE_ON_STARTUP = 1;
|
2023-03-06 15:05:35 +01:00
|
|
|
};
|
2023-02-28 20:48:06 +01:00
|
|
|
};
|
2023-01-10 11:31:33 +01:00
|
|
|
|
2023-10-13 00:28:39 +02:00
|
|
|
documentation.dev.enable = true;
|
2022-12-27 18:21:33 +01:00
|
|
|
system.stateVersion = "22.11";
|
2022-12-18 17:01:34 +01:00
|
|
|
}
|