blob: 54b703217ab710339a6338d9b9605a8004ed33e7 (
plain) (
blame)
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
59
60
61
62
63
64
65
66
67
68
69
70
|
{ system ? builtins.currentSystem, ... }:
let
nixpkgs = import ../nixpkgs-path.nix;
callMachine = path: rec {
config = import path;
build = import "${nixpkgs}/nixos/lib/eval-config.nix" {
inherit system;
modules = [ config ] ++ import ../modules/module-list.nix;
};
iso = let
isoModule = "${nixpkgs}/nixos/modules/installer/cd-dvd/iso-image.nix";
wrapIso = { config, pkgs, lib, ... }@attrs: let
eval = (import isoModule attrs);
evalcfg = eval.config or {};
bootcfg = evalcfg.boot or {};
fscfg = evalcfg.fileSystems or {};
in {
options = eval.options or {};
imports = eval.imports or [];
config = evalcfg // {
boot = bootcfg // lib.optionalAttrs (bootcfg ? loader) {
loader = lib.mkForce bootcfg.loader;
};
fileSystems = lib.mapAttrs (lib.const lib.mkForce) fscfg;
};
};
in import "${nixpkgs}/nixos/lib/eval-config.nix" {
inherit system;
modules = [
use wrapIso
(
{ lib, ... }: let
name = build.config.networking.hostName;
upperName = lib.toUpper name;
in rec {
isoImage.isoName = "${name}.iso";
isoImage.volumeID = builtins.substring 0 11 "${upperName}_LIVE";
isoImage.makeEfiBootable = true;
isoImage.makeUsbBootable = true;
isoImage.appendToMenuLabel = " \"${name}\" Live System";
}
)
];
};
use = {
imports = [ config ] ++ import ../modules/module-list.nix;
};
};
in {
aszlig = {
dnyarri = callMachine ./aszlig/dnyarri.nix;
mmrnmhrm = callMachine ./aszlig/mmrnmhrm.nix;
arilou = callMachine ./aszlig/arilou.nix;
kzerza = callMachine ./aszlig/kzerza.nix;
tishtushi = callMachine ./aszlig/tishtushi.nix;
};
labnet = {
heinrich = callMachine ./labnet/heinrich.nix;
labtop = callMachine ./labnet/labtop.nix;
};
profpatsch = {
katara = callMachine ./profpatsch/katara.nix;
};
misc = {
mailserver = callMachine ./misc/mailserver.nix;
};
}
|