-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
43 lines (40 loc) · 1.3 KB
/
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
40
41
42
43
{ inputs, systemsPkgs, vars, ... }:
let
host = with inputs.nixpkgs.lib.attrsets; system: path:
let
registry = (filterAttrs (name: _: name != "self") inputs) // { leviathan = inputs.self; };
modules = [
path
inputs.home-manager.nixosModules.home-manager
{
nix = {
nixPath = (mapAttrsToList (name: input: "${name}=${input}") inputs) ++ [ "nixos=${inputs.nixpkgs}" ];
registry = mapAttrs (_: input: { flake = input; }) registry;
};
nixpkgs = {
pkgs = systemsPkgs.${system};
overlays = attrValues inputs.self.overlays;
};
}
] ++ (attrValues inputs.self.nixosModules);
in
inputs.nixpkgs.lib.nixosSystem {
inherit system;
modules = modules ++ [
({ lib, modulesPath, ... }: {
system.build.vm = (import "${modulesPath}/../lib/eval-config.nix" {
inherit system;
modules = modules ++ [
"${modulesPath}/virtualisation/qemu-vm.nix"
{ boot.netboot.enable = lib.mkVMOverride false; }
];
}).config.system.build.vm;
})
];
specialArgs = { inherit vars; };
};
in
{
alligator = host "aarch64-linux" ./alligator;
leviathan-alpha = host "x86_64-linux" ./alpha;
}