diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-02 12:01:33 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-02 12:34:00 +0200 |
commit | fdf6f74d3221e3dad853898f296149baea0aa476 (patch) | |
tree | 9fcd0db87425e2f533354a431d2fa81bd55cbe36 /nixops | |
parent | 6e2dc958bc8c5aac4871d2a618741fa4628ed126 (diff) | |
download | Nix-fdf6f74d3221e3dad853898f296149baea0aa476.tar.gz Nix-fdf6f74d3221e3dad853898f296149baea0aa476.tar.zst Nix-fdf6f74d3221e3dad853898f296149baea0aa476.zip |
Refactor configuration and overlays
Diffstat (limited to 'nixops')
-rw-r--r-- | nixops/custom_nixops.nix | 2 | ||||
-rw-r--r-- | nixops/eldiron.nix | 3 | ||||
-rw-r--r-- | nixops/modules/websites/tools/ether/etherpad_lite.nix | 2 | ||||
-rwxr-xr-x | nixops/scripts/nixops_wrap | 2 | ||||
-rwxr-xr-x | nixops/scripts/pull_deployment | 2 | ||||
-rwxr-xr-x | nixops/scripts/push_deployment | 2 | ||||
-rwxr-xr-x | nixops/scripts/setup | 2 |
7 files changed, 8 insertions, 7 deletions
diff --git a/nixops/custom_nixops.nix b/nixops/custom_nixops.nix new file mode 100644 index 0000000..f024a4d --- /dev/null +++ b/nixops/custom_nixops.nix | |||
@@ -0,0 +1,2 @@ | |||
1 | with import <nixpkgs> { overlays = builtins.attrValues (import ../overlays); }; | ||
2 | nixops | ||
diff --git a/nixops/eldiron.nix b/nixops/eldiron.nix index 4994041..718d483 100644 --- a/nixops/eldiron.nix +++ b/nixops/eldiron.nix | |||
@@ -11,8 +11,7 @@ | |||
11 | _module.args = { | 11 | _module.args = { |
12 | pkgsNext = import <nixpkgsNext> {}; | 12 | pkgsNext = import <nixpkgsNext> {}; |
13 | pkgsPrevious = import <nixpkgsPrevious> {}; | 13 | pkgsPrevious = import <nixpkgsPrevious> {}; |
14 | mylibs = import ../libs.nix { nixpkgs = pkgs; }; | 14 | mylibs = import ../libs.nix { inherit pkgs; }; |
15 | mypkgs = import ../default.nix; | ||
16 | myconfig = { | 15 | myconfig = { |
17 | inherit privateFiles; | 16 | inherit privateFiles; |
18 | env = import "${privateFiles}/environment.nix"; | 17 | env = import "${privateFiles}/environment.nix"; |
diff --git a/nixops/modules/websites/tools/ether/etherpad_lite.nix b/nixops/modules/websites/tools/ether/etherpad_lite.nix index 14ad565..e67497b 100644 --- a/nixops/modules/websites/tools/ether/etherpad_lite.nix +++ b/nixops/modules/websites/tools/ether/etherpad_lite.nix | |||
@@ -47,7 +47,7 @@ let | |||
47 | text = | 47 | text = |
48 | # Make sure we’re not rebuilding whole libreoffice just because of a | 48 | # Make sure we’re not rebuilding whole libreoffice just because of a |
49 | # dependency | 49 | # dependency |
50 | let libreoffice = (import <nixpkgs> {}).libreoffice-fresh; | 50 | let libreoffice = (import <nixpkgs> { overlays = []; }).libreoffice-fresh; |
51 | in | 51 | in |
52 | '' | 52 | '' |
53 | { | 53 | { |
diff --git a/nixops/scripts/nixops_wrap b/nixops/scripts/nixops_wrap index 12f661a..d03784e 100755 --- a/nixops/scripts/nixops_wrap +++ b/nixops/scripts/nixops_wrap | |||
@@ -9,7 +9,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |||
9 | export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" | 9 | export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" |
10 | export NIXOPS_DEPLOYMENT="$DeploymentUuid" | 10 | export NIXOPS_DEPLOYMENT="$DeploymentUuid" |
11 | source $(dirname $(dirname $DIR))/nix_path_env | 11 | source $(dirname $(dirname $DIR))/nix_path_env |
12 | nixops="$(nix-build --no-out-link -A nixops "$(dirname $(dirname $DIR))")/bin/nixops" | 12 | nixops="$(nix-build --no-out-link "$(dirname $DIR)/custom_nixops.nix")/bin/nixops" |
13 | 13 | ||
14 | TEMP=$(mktemp -d /tmp/XXXXXX-nixops-files) | 14 | TEMP=$(mktemp -d /tmp/XXXXXX-nixops-files) |
15 | chmod go-rwx $TEMP | 15 | chmod go-rwx $TEMP |
diff --git a/nixops/scripts/pull_deployment b/nixops/scripts/pull_deployment index bc4a999..10f71fe 100755 --- a/nixops/scripts/pull_deployment +++ b/nixops/scripts/pull_deployment | |||
@@ -9,7 +9,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |||
9 | export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" | 9 | export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" |
10 | export NIXOPS_DEPLOYMENT="$DeploymentUuid" | 10 | export NIXOPS_DEPLOYMENT="$DeploymentUuid" |
11 | source $(dirname $(dirname $DIR))/nix_path_env | 11 | source $(dirname $(dirname $DIR))/nix_path_env |
12 | nixops="$(nix-build --no-out-link -A nixops "$(dirname $(dirname $DIR))")/bin/nixops" | 12 | nixops="$(nix-build --no-out-link "$(dirname $DIR)/custom_nixops.nix")/bin/nixops" |
13 | 13 | ||
14 | export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" | 14 | export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" |
15 | 15 | ||
diff --git a/nixops/scripts/push_deployment b/nixops/scripts/push_deployment index 067b665..6c67fab 100755 --- a/nixops/scripts/push_deployment +++ b/nixops/scripts/push_deployment | |||
@@ -9,6 +9,6 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |||
9 | export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" | 9 | export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" |
10 | export NIXOPS_DEPLOYMENT="$DeploymentUuid" | 10 | export NIXOPS_DEPLOYMENT="$DeploymentUuid" |
11 | source $(dirname $(dirname $DIR))/nix_path_env | 11 | source $(dirname $(dirname $DIR))/nix_path_env |
12 | nixops="$(nix-build --no-out-link -A nixops "$(dirname $(dirname $DIR))")/bin/nixops" | 12 | nixops="$(nix-build --no-out-link "$(dirname $DIR)/custom_nixops.nix")/bin/nixops" |
13 | 13 | ||
14 | $nixops export | pass insert -m $NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/Deployment | 14 | $nixops export | pass insert -m $NIXOPS_CONFIG_PASS_SUBTREE_PATH/Nixops/Deployment |
diff --git a/nixops/scripts/setup b/nixops/scripts/setup index 55dd9d9..1586265 100755 --- a/nixops/scripts/setup +++ b/nixops/scripts/setup | |||
@@ -136,7 +136,7 @@ fi | |||
136 | 136 | ||
137 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | 137 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" |
138 | source $(dirname $(dirname $DIR))/nix_path_env | 138 | source $(dirname $(dirname $DIR))/nix_path_env |
139 | nixops="$(nix-build --no-out-link -A nixops "$(dirname $(dirname $DIR))")/bin/nixops" | 139 | nixops="$(nix-build --no-out-link "$(dirname $DIR)/custom_nixops.nix")/bin/nixops" |
140 | export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" | 140 | export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" |
141 | export NIXOPS_DEPLOYMENT="$DeploymentUuid" | 141 | export NIXOPS_DEPLOYMENT="$DeploymentUuid" |
142 | 142 | ||