-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswitch
More file actions
executable file
·14 lines (12 loc) · 797 Bytes
/
Copy pathswitch
File metadata and controls
executable file
·14 lines (12 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env bash
cd "$(dirname "$0")"
if command -v nh &> /dev/null
then
sudo nh os switch -R --ask . $@ -- \
--option extra-substituters "https://cache.nixos.org https://nix-community.cachix.org https://graphite.cachix.org" \
--option extra-trusted-public-keys "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= graphite.cachix.org-1:B7Il1yMpkquN/dXM+5GRmz+4Xmu2aaCS1GcWNfFhsOo="
else
nix run nixpkgs#nh -- os switch --ask . $@ -- \
--option extra-substituters "https://cache.nixos.org https://nix-community.cachix.org https://graphite.cachix.org" \
--option extra-trusted-public-keys "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= graphite.cachix.org-1:B7Il1yMpkquN/dXM+5GRmz+4Xmu2aaCS1GcWNfFhsOo="
fi