-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmkNixosHost.nix
More file actions
47 lines (43 loc) · 1.37 KB
/
Copy pathmkNixosHost.nix
File metadata and controls
47 lines (43 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{ inputs, ... }:
{
mkNixosHost =
{
system ? "x86_64-linux",
hostname,
username ? "gene",
additionalModules ? [ ],
additionalSpecialArgs ? { },
}:
inputs.nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs hostname username;
}
// additionalSpecialArgs;
modules = [
./nixpkgs-settings.nix
inputs.disko.nixosModules.disko
inputs.home-manager.nixosModules.home-manager
{
home-manager = {
extraSpecialArgs = { inherit inputs hostname username; };
useGlobalPkgs = true;
useUserPackages = true;
users.${username}.imports = [
../modules/shared/home/general
../modules/shared/home/linux
../modules/hosts/nixos/${hostname}/home-${username}.nix
inputs.private-flake.homeManagerModules.private.git
(inputs.private-flake.homeManagerModules.private.${hostname} or { })
];
};
}
inputs.nix-flatpak.nixosModules.nix-flatpak
inputs.private-flake.nixosModules.private.ssh-keys
inputs.sops-nix.nixosModules.sops # system wide secrets management
../modules/hosts/nixos # system-wide stuff
../modules/hosts/nixos/${hostname} # host specific stuff
]
++ additionalModules;
};
}