diff --git a/hosts/andromache/default.nix b/hosts/andromache/default.nix index 220f993..b0bf839 100644 --- a/hosts/andromache/default.nix +++ b/hosts/andromache/default.nix @@ -12,12 +12,13 @@ in { imports = [ inputs.disko.nixosModules.disko - ../../modules/common ./hard.nix + ./host.nix inputs.nixos-hardware.nixosModules.common-cpu-intel inputs.nixos-hardware.nixosModules.common-pc inputs.nixos-hardware.nixosModules.common-pc-ssd inputs.sops-nix.nixosModules.sops + ../../modules/common ../../modules/boot/bootloader.nix (import ../../modules/disko/zfs-encrypted-root.nix { inherit lib config; @@ -43,11 +44,6 @@ in ../../modules/yubikey ]; - host = { - username = "h"; - name = "andromache"; - }; - home-manager.users.${config.host.username} = import ../../home/hosts/andromache { inherit inputs diff --git a/hosts/andromache/host.nix b/hosts/andromache/host.nix new file mode 100644 index 0000000..6c04778 --- /dev/null +++ b/hosts/andromache/host.nix @@ -0,0 +1,6 @@ +{ + host = { + username = "h"; + name = "andromache"; + }; +} diff --git a/hosts/astyanax/default.nix b/hosts/astyanax/default.nix index 9ad1767..dc21ea6 100644 --- a/hosts/astyanax/default.nix +++ b/hosts/astyanax/default.nix @@ -11,12 +11,13 @@ in { imports = [ inputs.disko.nixosModules.disko - ../../modules/common ./hard.nix + ./host.nix inputs.nixos-hardware.nixosModules.common-pc inputs.nixos-hardware.nixosModules.common-pc-ssd # inputs.nixos-hardware.nixosModules.lenovo-thinkpad-e14-intel-gen7 (not available yet?) inputs.sops-nix.nixosModules.sops + ../../modules/common ../../modules/boot/bootloader.nix (import ../../modules/disko/zfs-encrypted-root.nix { inherit lib config; @@ -40,11 +41,6 @@ in ../../modules/nfc ]; - host = { - username = "h"; - name = "astyanax"; - }; - home-manager.users.${config.host.username} = import ../../home/hosts/astyanax { inherit inputs diff --git a/hosts/astyanax/host.nix b/hosts/astyanax/host.nix new file mode 100644 index 0000000..10b1d02 --- /dev/null +++ b/hosts/astyanax/host.nix @@ -0,0 +1,6 @@ +{ + host = { + username = "h"; + name = "astyanax"; + }; +} diff --git a/hosts/eetion-02/default.nix b/hosts/eetion-02/default.nix index e4c2a7e..13d36b4 100644 --- a/hosts/eetion-02/default.nix +++ b/hosts/eetion-02/default.nix @@ -6,15 +6,11 @@ { imports = [ ./hard.nix - ../../modules/ssh + ./host.nix ../../modules/common + ../../modules/ssh ]; - host = { - username = "h"; - name = "eetion-02"; - }; - ssh = { inherit (config.host) username; publicHostname = config.host.name; diff --git a/hosts/eetion-02/host.nix b/hosts/eetion-02/host.nix new file mode 100644 index 0000000..4cf5a07 --- /dev/null +++ b/hosts/eetion-02/host.nix @@ -0,0 +1,6 @@ +{ + host = { + username = "h"; + name = "eetion-02"; + }; +} diff --git a/hosts/eetion/default.nix b/hosts/eetion/default.nix index 4b94d8f..13ce469 100644 --- a/hosts/eetion/default.nix +++ b/hosts/eetion/default.nix @@ -6,16 +6,12 @@ { imports = [ ./hard.nix - ../../modules/ssh + ./host.nix ../../modules/common + ../../modules/ssh # ../../modules/uptime-kuma ]; - host = { - username = "h"; - name = "eetion"; - }; - ssh = { inherit (config.host) username; publicHostname = config.host.name; diff --git a/hosts/eetion/host.nix b/hosts/eetion/host.nix new file mode 100644 index 0000000..c8aaa2b --- /dev/null +++ b/hosts/eetion/host.nix @@ -0,0 +1,6 @@ +{ + host = { + username = "h"; + name = "eetion"; + }; +} diff --git a/hosts/hecuba/default.nix b/hosts/hecuba/default.nix index b0dd830..d7cf910 100644 --- a/hosts/hecuba/default.nix +++ b/hosts/hecuba/default.nix @@ -10,17 +10,13 @@ { imports = [ inputs.disko.nixosModules.disko - ../../modules/common ./hard.nix + ./host.nix + ../../modules/common ../../modules/ssh ../../modules/docker ]; - host = { - username = "username"; - name = "hecuba"; - }; - networking.hostName = config.host.name; ssh = { inherit (config.host) username; diff --git a/hosts/hecuba/host.nix b/hosts/hecuba/host.nix new file mode 100644 index 0000000..6981353 --- /dev/null +++ b/hosts/hecuba/host.nix @@ -0,0 +1,6 @@ +{ + host = { + username = "username"; + name = "hecuba"; + }; +} diff --git a/hosts/vm/default.nix b/hosts/vm/default.nix index 41449df..e876cf3 100644 --- a/hosts/vm/default.nix +++ b/hosts/vm/default.nix @@ -8,10 +8,11 @@ { imports = [ inputs.disko.nixosModules.disko - ../../modules/common ./hard.nix + ./host.nix inputs.sops-nix.nixosModules.sops ./disk.nix + ../../modules/common ../../modules/boot/bootloader.nix ../../modules/keyboard (import ../../modules/networking { hostName = config.host.name; }) @@ -22,16 +23,12 @@ ../../modules/fonts ../../modules/ssh ../../modules/storage + ../../modules/stylix (import ../../modules/secrets { inherit lib inputs config; }) ]; - host = { - username = "h"; - name = "vm"; - }; - home-manager.users.${config.host.username} = import ../../home/hosts/vm { inherit inputs config pkgs; }; diff --git a/hosts/vm/host.nix b/hosts/vm/host.nix new file mode 100644 index 0000000..44fd7f4 --- /dev/null +++ b/hosts/vm/host.nix @@ -0,0 +1,6 @@ +{ + host = { + username = "h"; + name = "vm"; + }; +}