aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-03-23 11:28:10 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-03-23 11:28:10 +0100
commit30a783364abd0afe8399d8f39a251c499451c986 (patch)
tree8a72e45187bdc8db32f3b3559b004a86e9a2ecde
parente2b96bf56f536b3a8db732294ac13977e96cf322 (diff)
downloadNix-30a783364abd0afe8399d8f39a251c499451c986.tar.gz
Nix-30a783364abd0afe8399d8f39a251c499451c986.tar.zst
Nix-30a783364abd0afe8399d8f39a251c499451c986.zip
Remove dependency on immaeNixpkg in nix-path
-rw-r--r--nixops/eldiron.nix4
-rwxr-xr-xnixops/scripts/nixops_wrap6
-rwxr-xr-xnixops/scripts/setup25
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
12finish() { 12finish() {
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
18trap finish EXIT 17trap 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
29done 28done
30nixops set-args --argstr privateFiles "$TEMP" 29nixops set-args --argstr privateFiles "$TEMP"
31nixops set-args --argstr nixpkgsNext "$HOME/.nix-defexpr/channels/immaeNixpkgsNext"
32 30
33export NIX_PATH="ssh-config-file=$(dirname $DIR)/ssh/config:nixpkgs=$HOME/.nix-defexpr/channels/immaeNixpkgs" 31nixpkgsNext="https://releases.nixos.org/nixos/19.03/nixos-19.03beta171477.5847485e3ec/nixexprs.tar.xz"
32nixpkgs="https://releases.nixos.org/nixos/18.09/nixos-18.09.1834.9d608a6f592/nixexprs.tar.xz"
33export NIX_PATH="ssh-config-file=$(dirname $DIR)/ssh/config:nixpkgs=$nixpkgs:nixpkgsNext=$nixpkgsNext"
34nixops "$@" 34nixops "$@"
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
3RemoteRepo="gitolite@git.immae.eu:perso/Immae/Prive/Password_store/Mes_Sites/Paul" 3RemoteRepo="gitolite@git.immae.eu:perso/Immae/Prive/Password_store/Mes_Sites/Paul"
4NixChannelUrl='https://releases.nixos.org/nixos/18.09/nixos-18.09.1834.9d608a6f592'
5NixChannelName='immaeNixpkgs'
6DeploymentUuid="cef694f3-081d-11e9-b31f-0242ec186adf" 4DeploymentUuid="cef694f3-081d-11e9-b31f-0242ec186adf"
7 5
8if ! which nix 2>/dev/null >/dev/null; then 6if ! 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
80fi 78fi
81 79
82if ! 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
103fi
104
105if ! which nixops 2>/dev/null >/dev/null; then 80if ! which nixops 2>/dev/null >/dev/null; then
106 cat <<-EOF 81 cat <<-EOF
107 nixops is needed: 82 nixops is needed: