From 30a783364abd0afe8399d8f39a251c499451c986 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 23 Mar 2019 11:28:10 +0100 Subject: [PATCH] Remove dependency on immaeNixpkg in nix-path --- nixops/eldiron.nix | 4 ++-- nixops/scripts/nixops_wrap | 6 +++--- nixops/scripts/setup | 25 ------------------------- 3 files changed, 5 insertions(+), 30 deletions(-) diff --git a/nixops/eldiron.nix b/nixops/eldiron.nix index 44d928b..e95110f 100644 --- a/nixops/eldiron.nix +++ b/nixops/eldiron.nix @@ -1,4 +1,4 @@ -{ privateFiles ? ./., nixpkgsNext ? null }: +{ privateFiles ? ./. }: { network = { description = "Immae's network"; @@ -9,7 +9,7 @@ with mylibs; { _module.args = { - pkgsNext = if builtins.isNull nixpkgsNext then pkgs else import nixpkgsNext {}; + pkgsNext = import {}; mylibs = import ../libs.nix { nixpkgs = pkgs; }; mypkgs = import ../default.nix; myconfig = { diff --git a/nixops/scripts/nixops_wrap b/nixops/scripts/nixops_wrap index 914f2cc..f61bdf4 100755 --- a/nixops/scripts/nixops_wrap +++ b/nixops/scripts/nixops_wrap @@ -12,7 +12,6 @@ chmod go-rwx $TEMP finish() { rm -rf "$TEMP" nixops set-args --unset privateFiles - nixops set-args --unset nixpkgsNext } trap finish EXIT @@ -28,7 +27,8 @@ for file in $files; do pass show "$NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/files/$file" > $TEMP/$file done nixops set-args --argstr privateFiles "$TEMP" -nixops set-args --argstr nixpkgsNext "$HOME/.nix-defexpr/channels/immaeNixpkgsNext" -export NIX_PATH="ssh-config-file=$(dirname $DIR)/ssh/config:nixpkgs=$HOME/.nix-defexpr/channels/immaeNixpkgs" +nixpkgsNext="https://releases.nixos.org/nixos/19.03/nixos-19.03beta171477.5847485e3ec/nixexprs.tar.xz" +nixpkgs="https://releases.nixos.org/nixos/18.09/nixos-18.09.1834.9d608a6f592/nixexprs.tar.xz" +export NIX_PATH="ssh-config-file=$(dirname $DIR)/ssh/config:nixpkgs=$nixpkgs:nixpkgsNext=$nixpkgsNext" nixops "$@" diff --git a/nixops/scripts/setup b/nixops/scripts/setup index c94b72b..3815535 100755 --- a/nixops/scripts/setup +++ b/nixops/scripts/setup @@ -1,8 +1,6 @@ #!/bin/bash RemoteRepo="gitolite@git.immae.eu:perso/Immae/Prive/Password_store/Mes_Sites/Paul" -NixChannelUrl='https://releases.nixos.org/nixos/18.09/nixos-18.09.1834.9d608a6f592' -NixChannelName='immaeNixpkgs' DeploymentUuid="cef694f3-081d-11e9-b31f-0242ec186adf" if ! which nix 2>/dev/null >/dev/null; then @@ -79,29 +77,6 @@ if [ ! -f /etc/ssh/ssh_rsa_key_nixops ]; then fi fi -if ! nix-channel --list | grep -q "$NixChannelName $NixChannelUrl"; then - cat <<-EOF - A new nix channel will be installed (or upgraded) to freeze the packages - version: - $NixChannelName $NixChannelUrl - > nix-channel --add $NixChannelUrl $NixChannelName - > nix-channel --update - If this step fail, you may have to disable sandboxing in - /etc/nix/nix.conf and rerun - > nix-channel --update - manually. - Continue? [y/N] - EOF - read y - if [ "$y" = "y" -o "$y" = "Y" ]; then - nix-channel --add $NixChannelUrl $NixChannelName - nix-channel --update - else - echo "Aborting" - exit 1 - fi -fi - if ! which nixops 2>/dev/null >/dev/null; then cat <<-EOF nixops is needed: -- 2.41.0