From c24c2082113d1681fa882576c57381f476c566ce Mon Sep 17 00:00:00 2001 From: voidarc Date: Sat, 17 Oct 2026 14:35:25 +0100 Subject: [PATCH] abstracted importing hardware config --- modules/hosts/host/system.nix | 4 ---- modules/hosts/newHost/system.nix | 3 --- modules/system/default.nix | 1 + modules/system/imports.nix | 7 +++++++ 4 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 modules/system/imports.nix diff --git a/modules/hosts/host/system.nix b/modules/hosts/host/system.nix index 280bba9..77daa52 100644 --- a/modules/hosts/host/system.nix +++ b/modules/hosts/host/system.nix @@ -3,9 +3,5 @@ environment.systemPackages = with pkgs; [ git ]; - - imports = [ - /etc/nixos/hardware-configuration.nix - ]; }; } diff --git a/modules/hosts/newHost/system.nix b/modules/hosts/newHost/system.nix index 949fbb5..2986395 100644 --- a/modules/hosts/newHost/system.nix +++ b/modules/hosts/newHost/system.nix @@ -4,8 +4,5 @@ fastfetch ]; - imports = [ - /etc/nixos/hardware-configuration.nix - ]; }; } diff --git a/modules/system/default.nix b/modules/system/default.nix index 5b90f0a..196f898 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -4,6 +4,7 @@ user networking bootloader + imports ]; in { imports = modules; diff --git a/modules/system/imports.nix b/modules/system/imports.nix new file mode 100644 index 0000000..7b96c91 --- /dev/null +++ b/modules/system/imports.nix @@ -0,0 +1,7 @@ +{...}: { + flake.nixosModules.imports = {...}: { + imports = [ + /etc/nixos/hardware-configuration.nix + ]; + }; +}