diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-03-23 11:28:10 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-03-23 11:28:10 +0100 |
commit | 30a783364abd0afe8399d8f39a251c499451c986 (patch) | |
tree | 8a72e45187bdc8db32f3b3559b004a86e9a2ecde | |
parent | e2b96bf56f536b3a8db732294ac13977e96cf322 (diff) | |
download | Nix-30a783364abd0afe8399d8f39a251c499451c986.tar.gz Nix-30a783364abd0afe8399d8f39a251c499451c986.tar.zst Nix-30a783364abd0afe8399d8f39a251c499451c986.zip |
Remove dependency on immaeNixpkg in nix-path
-rw-r--r-- | nixops/eldiron.nix | 4 | ||||
-rwxr-xr-x | nixops/scripts/nixops_wrap | 6 | ||||
-rwxr-xr-x | 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 @@ | |||
1 | { privateFiles ? ./., nixpkgsNext ? null }: | 1 | { privateFiles ? ./. }: |
2 | { | 2 | { |
3 | network = { | 3 | network = { |
4 | description = "Immae's network"; | 4 | description = "Immae's network"; |
@@ -9,7 +9,7 @@ | |||
9 | with mylibs; | 9 | with mylibs; |
10 | { | 10 | { |
11 | _module.args = { | 11 | _module.args = { |
12 | pkgsNext = if builtins.isNull nixpkgsNext then pkgs else import nixpkgsNext {}; | 12 | pkgsNext = import <nixpkgsNext> {}; |
13 | mylibs = import ../libs.nix { nixpkgs = pkgs; }; | 13 | mylibs = import ../libs.nix { nixpkgs = pkgs; }; |
14 | mypkgs = import ../default.nix; | 14 | mypkgs = import ../default.nix; |
15 | myconfig = { | 15 | 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 | |||
12 | finish() { | 12 | finish() { |
13 | rm -rf "$TEMP" | 13 | rm -rf "$TEMP" |
14 | nixops set-args --unset privateFiles | 14 | nixops set-args --unset privateFiles |
15 | nixops set-args --unset nixpkgsNext | ||
16 | } | 15 | } |
17 | 16 | ||
18 | trap finish EXIT | 17 | trap finish EXIT |
@@ -28,7 +27,8 @@ for file in $files; do | |||
28 | pass show "$NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/files/$file" > $TEMP/$file | 27 | pass show "$NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/files/$file" > $TEMP/$file |
29 | done | 28 | done |
30 | nixops set-args --argstr privateFiles "$TEMP" | 29 | nixops set-args --argstr privateFiles "$TEMP" |
31 | nixops set-args --argstr nixpkgsNext "$HOME/.nix-defexpr/channels/immaeNixpkgsNext" | ||
32 | 30 | ||
33 | export NIX_PATH="ssh-config-file=$(dirname $DIR)/ssh/config:nixpkgs=$HOME/.nix-defexpr/channels/immaeNixpkgs" | 31 | nixpkgsNext="https://releases.nixos.org/nixos/19.03/nixos-19.03beta171477.5847485e3ec/nixexprs.tar.xz" |
32 | nixpkgs="https://releases.nixos.org/nixos/18.09/nixos-18.09.1834.9d608a6f592/nixexprs.tar.xz" | ||
33 | export NIX_PATH="ssh-config-file=$(dirname $DIR)/ssh/config:nixpkgs=$nixpkgs:nixpkgsNext=$nixpkgsNext" | ||
34 | nixops "$@" | 34 | 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 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | RemoteRepo="gitolite@git.immae.eu:perso/Immae/Prive/Password_store/Mes_Sites/Paul" | 3 | RemoteRepo="gitolite@git.immae.eu:perso/Immae/Prive/Password_store/Mes_Sites/Paul" |
4 | NixChannelUrl='https://releases.nixos.org/nixos/18.09/nixos-18.09.1834.9d608a6f592' | ||
5 | NixChannelName='immaeNixpkgs' | ||
6 | DeploymentUuid="cef694f3-081d-11e9-b31f-0242ec186adf" | 4 | DeploymentUuid="cef694f3-081d-11e9-b31f-0242ec186adf" |
7 | 5 | ||
8 | if ! which nix 2>/dev/null >/dev/null; then | 6 | if ! which nix 2>/dev/null >/dev/null; then |
@@ -79,29 +77,6 @@ if [ ! -f /etc/ssh/ssh_rsa_key_nixops ]; then | |||
79 | fi | 77 | fi |
80 | fi | 78 | fi |
81 | 79 | ||
82 | if ! nix-channel --list | grep -q "$NixChannelName $NixChannelUrl"; then | ||
83 | cat <<-EOF | ||
84 | A new nix channel will be installed (or upgraded) to freeze the packages | ||
85 | version: | ||
86 | $NixChannelName $NixChannelUrl | ||
87 | > nix-channel --add $NixChannelUrl $NixChannelName | ||
88 | > nix-channel --update | ||
89 | If this step fail, you may have to disable sandboxing in | ||
90 | /etc/nix/nix.conf and rerun | ||
91 | > nix-channel --update | ||
92 | manually. | ||
93 | Continue? [y/N] | ||
94 | EOF | ||
95 | read y | ||
96 | if [ "$y" = "y" -o "$y" = "Y" ]; then | ||
97 | nix-channel --add $NixChannelUrl $NixChannelName | ||
98 | nix-channel --update | ||
99 | else | ||
100 | echo "Aborting" | ||
101 | exit 1 | ||
102 | fi | ||
103 | fi | ||
104 | |||
105 | if ! which nixops 2>/dev/null >/dev/null; then | 80 | if ! which nixops 2>/dev/null >/dev/null; then |
106 | cat <<-EOF | 81 | cat <<-EOF |
107 | nixops is needed: | 82 | nixops is needed: |