Files
nix-config/lib/nixosSystem.nix
2023-12-29 17:36:47 +08:00

36 lines
873 B
Nix

{
nixpkgs,
home-manager,
nixos-generators,
system,
specialArgs,
nixos-modules,
home-module,
}: let
inherit (specialArgs) username;
in
nixpkgs.lib.nixosSystem {
inherit system specialArgs;
modules =
nixos-modules
++ [
nixos-generators.nixosModules.all-formats
{
# formatConfigs.iso = {config, ...}: {};
formatConfigs.proxmox = {config, ...}: {
# custom proxmox's image name
proxmox.qemuConf.name = "${config.networking.hostName}-nixos-${config.system.nixos.label}";
};
}
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = specialArgs;
home-manager.users."${username}" = home-module;
}
];
}