Refactor.
This commit is contained in:
10
flake.nix
10
flake.nix
@@ -56,6 +56,14 @@
|
||||
|
||||
mkHost =
|
||||
system: profile: modules:
|
||||
let
|
||||
# Auto-import profile-specific module based on profile parameter
|
||||
profileModule =
|
||||
if profile == "server" then ./common/server-node.nix
|
||||
else if profile == "workstation" then ./common/workstation-node.nix
|
||||
else if profile == "desktop" then ./common/desktop-node.nix
|
||||
else null;
|
||||
in
|
||||
nixpkgs.lib.nixosSystem {
|
||||
system = system;
|
||||
modules = [
|
||||
@@ -87,7 +95,7 @@
|
||||
};
|
||||
};
|
||||
}
|
||||
] ++ modules;
|
||||
] ++ nixpkgs.lib.optional (profileModule != null) profileModule ++ modules;
|
||||
specialArgs = {
|
||||
inherit inputs self;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user