From 54055d0f9e624b46010135f41737c1031238e5e7 Mon Sep 17 00:00:00 2001 From: notohh Date: Mon, 13 May 2024 15:19:48 -0400 Subject: [PATCH] hosts: move modules to common file --- hosts/ame/default.nix | 1 + hosts/ame/hardware.nix | 10 ++++++++++ hosts/arashi/default.nix | 1 + hosts/common.nix | 8 ++++++++ hosts/default.nix | 29 ----------------------------- hosts/haru/default.nix | 1 + hosts/kariru/default.nix | 1 + hosts/kaze/default.nix | 1 + hosts/sora/default.nix | 1 + hosts/sora/services/attic.nix | 3 +++ hosts/tsuki/default.nix | 1 + hosts/tsuru/default.nix | 1 + hosts/yuki/default.nix | 1 + hosts/yuki/services/wallos.nix | 2 +- 14 files changed, 31 insertions(+), 30 deletions(-) create mode 100644 hosts/common.nix diff --git a/hosts/ame/default.nix b/hosts/ame/default.nix index 0d6c80f..19db42a 100644 --- a/hosts/ame/default.nix +++ b/hosts/ame/default.nix @@ -3,6 +3,7 @@ _: { ./hardware.nix ./services ./networking.nix + ../common.nix ../../modules ../../modules/fonts.nix ]; diff --git a/hosts/ame/hardware.nix b/hosts/ame/hardware.nix index 8a9cc66..bde282a 100644 --- a/hosts/ame/hardware.nix +++ b/hosts/ame/hardware.nix @@ -1,4 +1,5 @@ { + inputs, config, lib, modulesPath, @@ -6,6 +7,7 @@ }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") + inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480 ]; boot = { @@ -18,6 +20,7 @@ }; efi = { canTouchEfiVariables = true; + efiSysMountPoint = "/boot/efi"; }; }; initrd = { @@ -26,6 +29,13 @@ }; }; + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid"; + fsType = "ext4"; + }; + }; + zramSwap = { enable = true; swapDevices = 1; diff --git a/hosts/arashi/default.nix b/hosts/arashi/default.nix index 0ceef1f..053a564 100644 --- a/hosts/arashi/default.nix +++ b/hosts/arashi/default.nix @@ -3,6 +3,7 @@ ./hardware.nix ./services ./networking.nix + ../common.nix ../../modules ]; diff --git a/hosts/common.nix b/hosts/common.nix new file mode 100644 index 0000000..686edcc --- /dev/null +++ b/hosts/common.nix @@ -0,0 +1,8 @@ +{inputs, ...}: { + imports = [ + inputs.sops-nix.nixosModules.sops + inputs.home-manager.nixosModules.home-manager + inputs.nur.nixosModules.nur + inputs.attic.nixosModules.atticd + ]; +} diff --git a/hosts/default.nix b/hosts/default.nix index 5919ec8..d434833 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -6,20 +6,11 @@ flake.nixosConfigurations = let inherit (inputs.nixpkgs.lib) nixosSystem; specialArgs = {inherit inputs;}; - sopsModule = inputs.sops-nix.nixosModules.sops; - hmModule = inputs.home-manager.nixosModules.home-manager; - atticModule = inputs.attic.nixosModules.atticd; - nurModule = inputs.nur.nixosModules.nur; - t480Module = inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480; in { tsuki = nixosSystem { inherit specialArgs; modules = [ ./tsuki - sopsModule - hmModule - atticModule - nurModule { home-manager = { useGlobalPkgs = true; @@ -36,9 +27,6 @@ inherit specialArgs; modules = [ ./ame - sopsModule - hmModule - t480Module { home-manager = { useGlobalPkgs = true; @@ -55,8 +43,6 @@ inherit specialArgs; modules = [ ./sakura - sopsModule - hmModule { home-manager = { useGlobalPkgs = true; @@ -73,8 +59,6 @@ inherit specialArgs; modules = [ ./kariru - sopsModule - hmModule { home-manager = { useGlobalPkgs = true; @@ -91,8 +75,6 @@ inherit specialArgs; modules = [ ./yuki - sopsModule - hmModule { home-manager = { useGlobalPkgs = true; @@ -109,8 +91,6 @@ inherit specialArgs; modules = [ ./arashi - sopsModule - hmModule { home-manager = { useGlobalPkgs = true; @@ -127,9 +107,6 @@ inherit specialArgs; modules = [ ./sora - sopsModule - atticModule - hmModule { home-manager = { useGlobalPkgs = true; @@ -146,8 +123,6 @@ inherit specialArgs; modules = [ ./tsuru - sopsModule - hmModule { home-manager = { useGlobalPkgs = true; @@ -164,8 +139,6 @@ inherit specialArgs; modules = [ ./haru - sopsModule - hmModule { home-manager = { useGlobalPkgs = true; @@ -182,8 +155,6 @@ inherit specialArgs; modules = [ ./kaze - sopsModule - hmModule { home-manager = { useGlobalPkgs = true; diff --git a/hosts/haru/default.nix b/hosts/haru/default.nix index c7f3ef6..945b49b 100644 --- a/hosts/haru/default.nix +++ b/hosts/haru/default.nix @@ -3,6 +3,7 @@ ./hardware.nix ./services ./networking.nix + ../common.nix ../../modules ]; diff --git a/hosts/kariru/default.nix b/hosts/kariru/default.nix index 2afeffc..53b937f 100644 --- a/hosts/kariru/default.nix +++ b/hosts/kariru/default.nix @@ -3,6 +3,7 @@ ./hardware.nix ./services ./networking.nix + ../common.nix ../../modules ]; diff --git a/hosts/kaze/default.nix b/hosts/kaze/default.nix index 17ec406..86d9731 100644 --- a/hosts/kaze/default.nix +++ b/hosts/kaze/default.nix @@ -3,6 +3,7 @@ ./hardware.nix ./services ./networking.nix + ../common.nix ../../modules ]; diff --git a/hosts/sora/default.nix b/hosts/sora/default.nix index 1fe3b24..6b808e7 100644 --- a/hosts/sora/default.nix +++ b/hosts/sora/default.nix @@ -3,6 +3,7 @@ _: { ./hardware.nix ./networking.nix ./services + ../common.nix ../../modules ]; diff --git a/hosts/sora/services/attic.nix b/hosts/sora/services/attic.nix index 3d98d56..bcc655c 100644 --- a/hosts/sora/services/attic.nix +++ b/hosts/sora/services/attic.nix @@ -1,8 +1,11 @@ { + inputs, config, pkgs, ... }: { + imports = [inputs.attic.nixosModules.atticd]; + sops.secrets.attic = {}; environment.systemPackages = [pkgs.attic]; diff --git a/hosts/tsuki/default.nix b/hosts/tsuki/default.nix index 82c9e50..138e83b 100755 --- a/hosts/tsuki/default.nix +++ b/hosts/tsuki/default.nix @@ -9,6 +9,7 @@ ./hardware.nix ./services ./networking.nix + ../common.nix ../../home/wayland ../../modules ../../modules/fonts.nix diff --git a/hosts/tsuru/default.nix b/hosts/tsuru/default.nix index 72b2b65..67df882 100644 --- a/hosts/tsuru/default.nix +++ b/hosts/tsuru/default.nix @@ -3,6 +3,7 @@ ./hardware.nix ./services ./networking.nix + ../common.nix ../../modules ]; diff --git a/hosts/yuki/default.nix b/hosts/yuki/default.nix index a1505c7..d04b201 100644 --- a/hosts/yuki/default.nix +++ b/hosts/yuki/default.nix @@ -3,6 +3,7 @@ ./hardware.nix ./services ./networking.nix + ../common.nix ../../modules ]; diff --git a/hosts/yuki/services/wallos.nix b/hosts/yuki/services/wallos.nix index 98a5488..893899e 100644 --- a/hosts/yuki/services/wallos.nix +++ b/hosts/yuki/services/wallos.nix @@ -1,6 +1,6 @@ _: { virtualisation.oci-containers.containers.wallos = { - image = "bellamy/wallos@sha256:283cef1078cd8d3bf4474c641968328bd3da7c4bb11e92abd0a3a65036b31f47"; #v 1.23.0 + image = "bellamy/wallos@sha256:142d7f1202cc0d80a02e9ae48c1a53de7cf5f448758d853a1fe8f5af732459fd"; #v 1.27.1 ports = ["8282:80"]; volumes = [ "/home/notoh/docker/wallos/db:/var/www/html/db"