-
Notifications
You must be signed in to change notification settings - Fork 8
/
default.nix
29 lines (25 loc) · 1.1 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
# Sanity check the repo by evaluating/building all machine configs.
{ branch ? "pinned" # default to pinned/reproducible
, nixpkgs ? import ./inputs/nixpkgs.nix { inherit branch; }
, pkgs ? let p = import nixpkgs { config = import ./cfg/nixpkgs-config.nix; overlays = []; }; in builtins.trace "nixpkgs version: ${p.lib.version} (rev: ${nixpkgs.rev or "unknown"})" p
}:
let
nixosFunc = import (pkgs.path + "/nixos");
iso = import ./isos/livecd/default.nix { inherit pkgs; };
buildConfig = config:
# FIXME: Machines that set 'boot.loader.systemd-boot.enable = true' fail to
# build the vmWithBootloader attribute, ref
# https://github.com/NixOS/nixpkgs/pull/65133.
pkgs.lib.filterAttrs
(n: v: n != "vmWithBootLoader")
((nixosFunc { configuration = config; }) // { recurseForDerivations = true; });
in
{
inherit iso;
localPkgs = import ./pkgs/default.nix { inherit pkgs; };
machines = pkgs.recurseIntoAttrs {
media = buildConfig ./machines/media/configuration.nix;
mini = buildConfig ./machines/mini/configuration.nix;
srv1 = buildConfig ./machines/srv1/configuration.nix;
};
}