-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.nix
34 lines (34 loc) · 971 Bytes
/
test.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
with import <nixpkgs/lib>;
let
pkgs = import <nixpkgs> {
overlays = (import ./overlays);
};
configFor = system: modules: (import <nixpkgs/nixos/lib/eval-config.nix> {
system = system;
modules = modules;
pkgs = pkgs;
}).config.system.build;
configForMachine = system: machineName:
configFor system [(./machines + "/${machineName}.nix")];
targetForMachine = system: machineName: (configForMachine system machineName).toplevel;
in rec
{
inherit pkgs;
machines = genAttrs [
"cic"
"hiro"
] (targetForMachine "x86_64-linux");
armMachines = genAttrs [
"librarian"
] (targetForMachine "armv6l-linux");
nixpkgs = pkgs.releaseTools.channel {
constituents = [ machines.cic machines.hiro ];
name = "nixpkgs";
src = <nixpkgs>;
};
nixos-config = pkgs.releaseTools.channel {
constituents = [machines.cic machines.hiro ];
name = "nixos-config";
src = ./.;
};
}