-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathdefault.nix
39 lines (35 loc) · 906 Bytes
/
default.nix
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
{
self,
lib,
inputs,
machineDir,
hostType,
platform ? null,
stateVersion ? null,
...
}:
let
machineConfigurationPath = "${self}/system/machine/${machineDir}";
machineConfigurationPathExist = builtins.pathExists machineConfigurationPath;
machineModulesPath = "${self}/system/machine/${machineDir}/modules";
machineModulesPathExist = builtins.pathExists machineModulesPath;
in
{
imports =
[
"${self}/modules"
"${self}/overlays/nixpkgs"
"${self}/system/${hostType}/modules"
]
++ lib.optional machineConfigurationPathExist machineConfigurationPath
++ lib.optional machineModulesPathExist machineModulesPath;
module.nix-config.enable = true;
system = { inherit stateVersion; };
nixpkgs = {
hostPlatform = platform;
overlays = [
inputs.nix-topology.overlays.default
inputs.proxmox-nixos.overlays.${platform}
];
};
}