From 7f6c65320aa354b31b0446ddfa30b9f92b914daa Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Sun, 6 Jul 2025 05:31:20 +0800 Subject: [PATCH] feat(hostSpec): add extraCfg to hostSpec and imports to nixosSystem --- modules/configurations/nixos.nix | 3 ++- modules/hostSpec.nix | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/modules/configurations/nixos.nix b/modules/configurations/nixos.nix index b3f0743..226998c 100644 --- a/modules/configurations/nixos.nix +++ b/modules/configurations/nixos.nix @@ -19,7 +19,8 @@ let name = hostName; value = lib.nixosSystem { specialArgs = { inherit inputs hostName; }; - modules = [ value ]; + #TODO: add profiles system + modules = [ value.extraCfg or { } ]; }; }; in diff --git a/modules/hostSpec.nix b/modules/hostSpec.nix index 3059518..d86ae82 100644 --- a/modules/hostSpec.nix +++ b/modules/hostSpec.nix @@ -1,15 +1,17 @@ { config, ... }: { flake.hostSpec.hosts = { - "nixos/test".imports = with config.flake.modules.nixos; [ networking ]; - "nixos/test".config = { - boot.loader.systemd-boot.enable = true; - fileSystems."/" = { - device = "/dev/sda1"; - fsType = "ext4"; + "nixos/test".extraCfg = { + imports = with config.flake.modules.nixos; [ networking ]; + config = { + boot.loader.systemd-boot.enable = true; + fileSystems."/" = { + device = "/dev/sda1"; + fsType = "ext4"; + }; + nixpkgs.hostPlatform = "x86_64-linux"; + system.stateVersion = "25.05"; }; - nixpkgs.hostPlatform = "x86_64-linux"; - system.stateVersion = "25.05"; }; }; }