feat(nixos): integrate agent VM into host configurations

This commit is contained in:
2026-10-22 10:20:30 +08:00
parent d71fab81d5
commit 5c2e25b989
14 changed files with 826 additions and 28 deletions
+15 -8
View File
@@ -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;
}