diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-10-18 19:33:49 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-10-18 19:33:49 +0200 |
commit | c0f966510475d8d621f302c1bd70f430e589b838 (patch) | |
tree | bac9c5d1dc178003c27c3b0823b4f4a7591df31c | |
parent | refactor(hosts): Move all unmaintained hosts to the `_unmaintained` dir (diff) | |
download | nixos-config-c0f966510475d8d621f302c1bd70f430e589b838.tar.gz nixos-config-c0f966510475d8d621f302c1bd70f430e589b838.zip |
feat(hosts): Share common options
-rw-r--r-- | flake/nixosConfigurations/common.nix | 43 | ||||
-rw-r--r-- | flake/nixosConfigurations/default.nix | 1 | ||||
-rw-r--r-- | hosts/apzu/default.nix | 43 | ||||
-rw-r--r-- | hosts/tiamat/default.nix | 49 | ||||
-rw-r--r-- | hosts/tiamat/hardware.nix | 7 |
5 files changed, 58 insertions, 85 deletions
diff --git a/flake/nixosConfigurations/common.nix b/flake/nixosConfigurations/common.nix new file mode 100644 index 00000000..fce2c6a1 --- /dev/null +++ b/flake/nixosConfigurations/common.nix @@ -0,0 +1,43 @@ +# This file contains common configuration applied to every host. +# It should only `enable` options defined in the `modules` directory. +{...}: { + soispha = { + boot.enable = true; + cleanup.enable = true; + documentation.enable = true; + + fonts = { + enable = true; + enableEmoji = true; + }; + + home-manager.enable = true; + impermanence.enable = true; + polkit.enable = true; + power.enable = true; + secrets.enable = true; + + services = { + adb = { + enable = true; + user = "soispha"; + }; + fwupd.enable = true; + postgresql.enable = false; + printing.enable = true; + scanning.enable = true; + snapper.enable = true; + steam.enable = false; + systemDiff.enable = true; + }; + + programs = { + imv.enable = true; + zathura.enable = true; + }; + + sound.enable = true; + tempfiles.enable = true; + version.enable = true; + }; +} diff --git a/flake/nixosConfigurations/default.nix b/flake/nixosConfigurations/default.nix index c4353d5f..564d2535 100644 --- a/flake/nixosConfigurations/default.nix +++ b/flake/nixosConfigurations/default.nix @@ -36,6 +36,7 @@ serverphone.nixosModules.default ../../modules + ./common.nix ]; specialArgs = { diff --git a/hosts/apzu/default.nix b/hosts/apzu/default.nix index def21291..98c83325 100644 --- a/hosts/apzu/default.nix +++ b/hosts/apzu/default.nix @@ -4,61 +4,30 @@ ]; soispha = { - boot.enable = true; - cleanup.enable = true; - documentation.enable = true; - fonts = { - enable = true; - enableEmoji = true; + services.backup = { + # Apzu should be regularly synced with Tiamat, which performs updates. + enable = false; }; - home-manager.enable = true; - impermanence.enable = true; + bluetooth.enable = true; laptop = { - enable = true; backlight = "intel_backlight"; + enable = true; }; locale.enable = true; - networking = { enable = true; - mode = "NetworkManager"; hostName = "apzu"; - }; - bluetooth = { - enable = true; + mode = "NetworkManager"; }; nixpkgs = { enable = true; systemName = "x86_64-linux"; }; - polkit.enable = true; - power.enable = true; - secrets.enable = true; - services = { - adb = { - enable = true; - user = "soispha"; - }; - backup = { - enable = true; - backupDiskUuid = "d1c6e0f6-1837-40fd-bb29-251d5ea0ddb0"; - }; - fwupd.enable = true; - postgresql.enable = false; - printing.enable = true; - scanning.enable = true; - snapper.enable = true; - steam.enable = false; - systemDiff.enable = true; - }; - sound.enable = true; - tempfiles.enable = true; users = { enable = true; enableDeprecatedPlugdev = true; hashedPassword = "$y$jFT$3qI9MYLDHPUdGKsVa8skV0$TOjX0SFHWuj52zd7/kmkNtG5EqQwYcqv0FKXWbLaro6"; }; - version.enable = true; }; system.stateVersion = "23.05"; diff --git a/hosts/tiamat/default.nix b/hosts/tiamat/default.nix index 6e72ccca..b679ec62 100644 --- a/hosts/tiamat/default.nix +++ b/hosts/tiamat/default.nix @@ -4,65 +4,32 @@ ]; soispha = { - boot.enable = true; - cleanup.enable = true; - documentation.enable = true; - fonts = { - enable = true; - enableEmoji = true; - }; - home-manager.enable = true; - impermanence.enable = true; - + bluetooth = {enable = true;}; networking = { enable = true; - mode = "systemd-networkd"; hostName = "tiamat"; + mode = "systemd-networkd"; }; - bluetooth = { - enable = true; - }; - - polkit.enable = true; - power.enable = true; - secrets.enable = true; - sound.enable = true; - tempfiles.enable = true; - users = { - enable = true; - enableDeprecatedPlugdev = true; - hashedPassword = "$y$jFT$qi3wS9njrMl2y55b3NOBI0$j40Qt6AAkMSfZ82KPhqMaUaPztWtPps1wOqaXaF/L.6"; - }; - version.enable = true; nixpkgs = { enable = true; systemName = "x86_64-linux"; }; - services = { - adb = { - enable = true; - user = "soispha"; - }; backup = { - enable = true; backupDiskUuid = "c06ce163-2955-4388-b212-dfec4448fcf4"; + enable = true; }; - fwupd.enable = true; - postgresql.enable = false; - printing.enable = true; - scanning.enable = true; - snapper.enable = true; - - steam.enable = false; - systemDiff.enable = true; }; locale = { enable = true; keyMap = "us"; }; + users = { + enable = true; + enableDeprecatedPlugdev = true; + hashedPassword = "$y$jFT$qi3wS9njrMl2y55b3NOBI0$j40Qt6AAkMSfZ82KPhqMaUaPztWtPps1wOqaXaF/L.6"; + }; }; - networking.hostName = "tiamat"; system.stateVersion = "23.05"; } diff --git a/hosts/tiamat/hardware.nix b/hosts/tiamat/hardware.nix index 8ecb4ce0..97600848 100644 --- a/hosts/tiamat/hardware.nix +++ b/hosts/tiamat/hardware.nix @@ -3,13 +3,6 @@ (modulesPath + "/installer/scan/not-detected.nix") # TODO: is this necessary? ]; - hardware = { - bluetooth = { - enable = true; - powerOnBoot = true; - }; - }; - soispha = { hardware = { enable = true; |