-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnspawn-rootSystem.nix
More file actions
38 lines (33 loc) · 894 Bytes
/
nspawn-rootSystem.nix
File metadata and controls
38 lines (33 loc) · 894 Bytes
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
{
config,
pkgs,
...
}: let
_symlinks = [
{
object = config.system.build.toplevel;
symlink = "/nix/var/nix/profiles/system";
}
];
_files = [
];
_files_no_symlink = [
{
# Required by machinectl
source = config.system.build.toplevel + "/etc/os-release";
target = "/etc/os-release";
}
];
in {
# Modified from: https://github.com/NixOS/nixpkgs/blob/5d20a2b99a586c6611b30b12a684df96f8f95c1c/nixos/lib/make-system-tarball.nix#L37
system.build.rootSystem = pkgs.stdenv.mkDerivation {
name = "nixos-root";
builder = ./make-system-root.sh;
sources = map (x: x.source) _files;
targets = map (x: x.target) _files;
sources_nl = map (x: x.source) _files_no_symlink;
targets_nl = map (x: x.target) _files_no_symlink;
symlinks = map (x: x.symlink) _symlinks;
objects = map (x: x.object) _symlinks;
};
}