aboutsummaryrefslogtreecommitdiff
path: root/nixos/rebuild
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/rebuild')
-rwxr-xr-xnixos/rebuild12
1 files changed, 8 insertions, 4 deletions
diff --git a/nixos/rebuild b/nixos/rebuild
index 1bc6c39..3dfbf71 100755
--- a/nixos/rebuild
+++ b/nixos/rebuild
@@ -7,12 +7,12 @@ cd "$(dirname -- "${BASH_SOURCE[0]}")"
configPath=$(realpath -- "hosts/$HOSTNAME/default.nix")
if [ ! -f $configPath ]; then
- echo "aborting: $configPath doesn't exist"
- exit 1
+ echo "aborting: $configPath doesn't exist"
+ exit 1
fi
nix-eval() {
- nix-instantiate --eval --raw --read-write-mode "$@"
+ nix-instantiate --eval --raw --read-write-mode "$@"
}
channel=$(nix-eval --argstr host "$HOSTNAME" --expr '{host}:
@@ -21,7 +21,11 @@ let
in
(builtins.fromTOML toml).channel
')
-nixpkgsPath=$(nix-eval --argstr channel "$channel" --expr '{channel}: (import ./npins).${channel}.outPath')
+nixpkgsPath=$(
+ nix-eval \
+ --argstr channel "$channel" \
+ --expr '{channel}: (import ./npins).${channel}.outPath'
+)
# nixos-rebuild always reads Nixpkgs from the NIX_PATH,
# so we need to set it explicitly to our pinned version