aboutsummaryrefslogtreecommitdiff
path: root/nixops
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-05-02 12:01:33 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-05-02 12:34:00 +0200
commitfdf6f74d3221e3dad853898f296149baea0aa476 (patch)
tree9fcd0db87425e2f533354a431d2fa81bd55cbe36 /nixops
parent6e2dc958bc8c5aac4871d2a618741fa4628ed126 (diff)
downloadNix-fdf6f74d3221e3dad853898f296149baea0aa476.tar.gz
Nix-fdf6f74d3221e3dad853898f296149baea0aa476.tar.zst
Nix-fdf6f74d3221e3dad853898f296149baea0aa476.zip
Refactor configuration and overlays
Diffstat (limited to 'nixops')
-rw-r--r--nixops/custom_nixops.nix2
-rw-r--r--nixops/eldiron.nix3
-rw-r--r--nixops/modules/websites/tools/ether/etherpad_lite.nix2
-rwxr-xr-xnixops/scripts/nixops_wrap2
-rwxr-xr-xnixops/scripts/pull_deployment2
-rwxr-xr-xnixops/scripts/push_deployment2
-rwxr-xr-xnixops/scripts/setup2
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 @@
1with import <nixpkgs> { overlays = builtins.attrValues (import ../overlays); };
2nixops
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 )"
9export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" 9export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops"
10export NIXOPS_DEPLOYMENT="$DeploymentUuid" 10export NIXOPS_DEPLOYMENT="$DeploymentUuid"
11source $(dirname $(dirname $DIR))/nix_path_env 11source $(dirname $(dirname $DIR))/nix_path_env
12nixops="$(nix-build --no-out-link -A nixops "$(dirname $(dirname $DIR))")/bin/nixops" 12nixops="$(nix-build --no-out-link "$(dirname $DIR)/custom_nixops.nix")/bin/nixops"
13 13
14TEMP=$(mktemp -d /tmp/XXXXXX-nixops-files) 14TEMP=$(mktemp -d /tmp/XXXXXX-nixops-files)
15chmod go-rwx $TEMP 15chmod 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 )"
9export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" 9export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops"
10export NIXOPS_DEPLOYMENT="$DeploymentUuid" 10export NIXOPS_DEPLOYMENT="$DeploymentUuid"
11source $(dirname $(dirname $DIR))/nix_path_env 11source $(dirname $(dirname $DIR))/nix_path_env
12nixops="$(nix-build --no-out-link -A nixops "$(dirname $(dirname $DIR))")/bin/nixops" 12nixops="$(nix-build --no-out-link "$(dirname $DIR)/custom_nixops.nix")/bin/nixops"
13 13
14export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" 14export 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 )"
9export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" 9export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops"
10export NIXOPS_DEPLOYMENT="$DeploymentUuid" 10export NIXOPS_DEPLOYMENT="$DeploymentUuid"
11source $(dirname $(dirname $DIR))/nix_path_env 11source $(dirname $(dirname $DIR))/nix_path_env
12nixops="$(nix-build --no-out-link -A nixops "$(dirname $(dirname $DIR))")/bin/nixops" 12nixops="$(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
137DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 137DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
138source $(dirname $(dirname $DIR))/nix_path_env 138source $(dirname $(dirname $DIR))/nix_path_env
139nixops="$(nix-build --no-out-link -A nixops "$(dirname $(dirname $DIR))")/bin/nixops" 139nixops="$(nix-build --no-out-link "$(dirname $DIR)/custom_nixops.nix")/bin/nixops"
140export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops" 140export NIXOPS_STATE="$(dirname $DIR)/state/eldiron.nixops"
141export NIXOPS_DEPLOYMENT="$DeploymentUuid" 141export NIXOPS_DEPLOYMENT="$DeploymentUuid"
142 142