feat(nixos): integrate agent VM into host configurations
This commit is contained in:
+15
-8
@@ -1,4 +1,8 @@
|
||||
{ nixpkgs, home-manager, inputs }:
|
||||
{
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
inputs,
|
||||
}:
|
||||
{
|
||||
hostname,
|
||||
hostName ? hostname,
|
||||
@@ -8,15 +12,18 @@
|
||||
username,
|
||||
extraModules ? [ ],
|
||||
extraSpecialArgs ? { },
|
||||
homeModules ? [ ../home ],
|
||||
homeStateVersion ? "25.05",
|
||||
useSops ? true,
|
||||
}:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit inputs system username;
|
||||
} // extraSpecialArgs;
|
||||
}
|
||||
// extraSpecialArgs;
|
||||
|
||||
modules = [
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
../hosts/${hostname}
|
||||
../profiles/${profile}.nix
|
||||
{
|
||||
@@ -31,11 +38,11 @@ nixpkgs.lib.nixosSystem {
|
||||
inherit inputs system;
|
||||
};
|
||||
home-manager.users.${username} = {
|
||||
home.stateVersion = "25.05";
|
||||
imports = [
|
||||
../home
|
||||
];
|
||||
home.stateVersion = homeStateVersion;
|
||||
imports = homeModules;
|
||||
};
|
||||
}
|
||||
] ++ extraModules;
|
||||
]
|
||||
++ nixpkgs.lib.optionals useSops [ inputs.sops-nix.nixosModules.sops ]
|
||||
++ extraModules;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user