stockholm/bin/nixos-build

25 lines
483 B
Plaintext
Raw Normal View History

2015-05-21 20:33:16 +00:00
#! /bin/sh
#
# build : hostname -> system-path
#
set -euf
host=$1
NIXOS_CONFIG=$config_root/modules/$host
export NIXOS_CONFIG
2015-05-21 20:33:16 +00:00
# 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
2015-05-21 21:52:06 +00:00
exec nix-build \
-A system \
--no-out-link \
'<nixos>'