forked from Mirrors/nixos-infect
use 16.09 channel by default
This commit is contained in:
parent
7c680bcd27
commit
be0ffec9bc
1 changed files with 7 additions and 4 deletions
11
nixos-infect
11
nixos-infect
|
@ -47,8 +47,6 @@
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
nixpkgs="https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz"
|
|
||||||
|
|
||||||
makeConf() {
|
makeConf() {
|
||||||
# NB <<"EOF" quotes / $ ` in heredocs, <<EOF does not
|
# NB <<"EOF" quotes / $ ` in heredocs, <<EOF does not
|
||||||
mkdir -p /etc/nixos
|
mkdir -p /etc/nixos
|
||||||
|
@ -156,11 +154,15 @@ curl https://nixos.org/nix/install | sh
|
||||||
|
|
||||||
source ~/.nix-profile/etc/profile.d/nix.sh
|
source ~/.nix-profile/etc/profile.d/nix.sh
|
||||||
|
|
||||||
nix-channel --remove \*
|
[ -z "$NIX_CHANNEL"] && NIX_CHANNEL="nixos-16.09"
|
||||||
export NIX_PATH="nixpkgs=$nixpkgs"
|
nix-channel --remove nixpkgs
|
||||||
|
nix-channel --add "https://nixos.org/channels/$NIX_CHANNEL" nixos
|
||||||
|
nix-channel --update
|
||||||
|
|
||||||
export NIXOS_CONFIG=/etc/nixos/configuration.nix
|
export NIXOS_CONFIG=/etc/nixos/configuration.nix
|
||||||
|
|
||||||
nix-env --set \
|
nix-env --set \
|
||||||
|
-I nixpkgs=$HOME/.nix-defexpr/channels/nixos \
|
||||||
-f '<nixpkgs/nixos>' \
|
-f '<nixpkgs/nixos>' \
|
||||||
-p /nix/var/nix/profiles/system \
|
-p /nix/var/nix/profiles/system \
|
||||||
-A system
|
-A system
|
||||||
|
@ -177,6 +179,7 @@ touch /etc/NIXOS
|
||||||
cat > /etc/NIXOS_LUSTRATE << EOF
|
cat > /etc/NIXOS_LUSTRATE << EOF
|
||||||
etc/nixos
|
etc/nixos
|
||||||
etc/resolv.conf
|
etc/resolv.conf
|
||||||
|
root/.nix-defexpr/channels
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
mv -v /boot /boot.bak &&
|
mv -v /boot /boot.bak &&
|
||||||
|
|
Loading…
Reference in a new issue