summaryrefslogtreecommitdiffstats
path: root/bin/nixos-build
blob: 235d7c1f6e6e393a160a61e2f56a0f6a83e12a8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /bin/sh
#
# build : hostname -> system-path
#
set -euf

host=$1

NIXOS_CONFIG=$config_root/modules/$host
export NIXOS_CONFIG

# Notice how host's NIX_PATH is used to prefetch nixpkgs.
prefetch nixpkgs "$nixpkgs_root/$host"

NIX_PATH=$nixpkgs_root/$host
NIX_PATH=$NIX_PATH:secrets=$secrets_root/$host/nix
NIX_PATH=$NIX_PATH:pubkeys=$config_root/pubkeys
NIX_PATH=$NIX_PATH:retiolum-hosts=$retiolum_hosts
export NIX_PATH

exec nix-build \
  -A system \
  --no-out-link \
  '<nixos>'
[cgit] Unable to lock slot /tmp/cgit/7f000000.lock: No such file or directory (2)