-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
58 lines (50 loc) · 1.72 KB
/
flake.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
overlays = [
(final: prev: {
ccacheClangStdenv = final.callPackage ./pkgs/stdenv.nix {};
inherit (self.packages.${system}) linux_metal linux_virtio;
})
];
};
lib = nixpkgs.lib;
in
{
nixosConfigurations = {
agent = lib.nixosSystem {
inherit system pkgs;
modules = [ ./systems/agent.nix ];
};
master = lib.nixosSystem {
inherit system pkgs;
specialArgs = { inherit nixpkgs; };
modules = [
./systems/master.nix
"${nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
"${nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix"
];
};
test = lib.nixosSystem {
inherit system pkgs;
modules = [ ./systems/test/test.nix ];
};
};
packages.${system} = {
linux_metal = pkgs.callPackage ./pkgs/kernel-metal.nix {};
linux_virtio = pkgs.callPackage ./pkgs/kernel-virtio.nix {};
agentImage = self.nixosConfigurations.agent.config.system.build.image;
masterImage = self.nixosConfigurations.master.config.system.build.image;
testImage = self.nixosConfigurations.test.config.system.build.image;
agentInstallISO = self.nixosConfigurations.agent.config.system.build.isoImage;
masterInstallISO = self.nixosConfigurations.master.config.system.build.isoImage;
testInstallISO = self.nixosConfigurations.test.config.system.build.isoImage;
};
};
}