diff --git a/nix/hosts/common/default.nix b/nix/hosts/common/default.nix new file mode 100644 index 0000000..fd0852f --- /dev/null +++ b/nix/hosts/common/default.nix @@ -0,0 +1,16 @@ +{ + hostname, + inputs, + outputs, + ... +}: + +{ + imports = [ + inputs.home-manager.nixosModules.home-manager + + outputs.nixosModules.default + ]; + + networking.hostName = hostname; +} diff --git a/nix/hosts/lemp11/configuration.nix b/nix/hosts/lemp11/configuration.nix index 817d4aa..cfb4e80 100644 --- a/nix/hosts/lemp11/configuration.nix +++ b/nix/hosts/lemp11/configuration.nix @@ -12,16 +12,12 @@ { imports = [ - inputs.home-manager.nixosModules.home-manager - inputs.nixos-hardware.nixosModules.common-cpu-intel inputs.nixos-hardware.nixosModules.common-gpu-intel inputs.nixos-hardware.nixosModules.common-pc-laptop inputs.nixos-hardware.nixosModules.common-pc-laptop-hdd inputs.nixos-hardware.nixosModules.system76 - outputs.nixosModules.default - ./hardware-configuration.nix ]; @@ -81,8 +77,6 @@ DefaultTimeoutStopSec=10s ''; - networking.hostName = hostname; - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # Configure network proxy if necessary diff --git a/nix/hosts/lemp11/default.nix b/nix/hosts/lemp11/default.nix index eee3017..cdd72e7 100644 --- a/nix/hosts/lemp11/default.nix +++ b/nix/hosts/lemp11/default.nix @@ -25,6 +25,8 @@ imports = [ inputs.agenix.nixosModules.default + ../common + ./configuration.nix ./secrets.nix diff --git a/nix/hosts/t490/configuration.nix b/nix/hosts/t490/configuration.nix index 170d090..5447798 100644 --- a/nix/hosts/t490/configuration.nix +++ b/nix/hosts/t490/configuration.nix @@ -12,10 +12,6 @@ { imports = [ - inputs.home-manager.nixosModules.home-manager - - outputs.nixosModules.default - ./hardware-configuration.nix ]; @@ -74,8 +70,6 @@ DefaultTimeoutStopSec=10s ''; - networking.hostName = hostname; - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # Configure network proxy if necessary diff --git a/nix/hosts/t490/default.nix b/nix/hosts/t490/default.nix index 1d03934..5900e7a 100644 --- a/nix/hosts/t490/default.nix +++ b/nix/hosts/t490/default.nix @@ -1,5 +1,7 @@ { - imports = [ + imports = [ + ../common + ./configuration.nix ]; }