]> Git — Sourcephile - julm/julm-nix.git/blob - build
systemd-creds: move to creds-{setup,encrypt,decrypt}.sh
[julm/julm-nix.git] / build
1 #!/bin/sh -eux
2 cd "${0%/*}"
3 host=$1
4 shift
5 chmod -R g-rwx,o-rwx private/root "$PWD"/private/hosts/*/root
6 trap 'git reset private/root private/hosts' EXIT
7 # prevent copying to /nix/store
8 git rm -rf --cached --ignore-unmatch private/root private/hosts/*
9 git reset private/hosts/"$host"/credentials private/hosts/"$host"/root/machine-id
10 time nix -L build "$@" -o hosts/"$host".root .\#nixosConfigurations."$host".config.system.build.toplevel