diff options
-rw-r--r-- | Makefile | 20 | ||||
-rw-r--r-- | default.nix | 2 | ||||
-rw-r--r-- | lib/default.nix (renamed from libs.nix) | 2 | ||||
-rw-r--r-- | overlays/default.nix | 2 | ||||
-rw-r--r-- | pkgs/default.nix | 2 | ||||
-rwxr-xr-x | scripts/fetch_version (renamed from fetch_version) | 0 | ||||
-rwxr-xr-x | scripts/make-env | 7 | ||||
-rw-r--r-- | scripts/nix_env (renamed from nix_path_env) | 2 | ||||
-rwxr-xr-x | scripts/nix_infos | 2 |
9 files changed, 30 insertions, 9 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..f4bb3f5f --- /dev/null +++ b/Makefile | |||
@@ -0,0 +1,20 @@ | |||
1 | subrecipes = setup ssh-eldiron info debug dry-run build upload deploy reboot push pull pull-deployment list-generations delete-generations cleanup | ||
2 | ${subrecipes}: | ||
3 | @$(MAKE) --no-print-directory -C nixops/ $@ | ||
4 | |||
5 | env: | ||
6 | ./scripts/make-env | ||
7 | |||
8 | env-dry-run: | ||
9 | ./scripts/make-env --dry-run | ||
10 | |||
11 | nix-info: | ||
12 | NIXOPS_DEPLOYMENT="" ./scripts/nix_infos | ||
13 | |||
14 | nix-info-nixops: | ||
15 | NIXOPS_DEPLOYMENT="n" ./scripts/nix_infos | ||
16 | |||
17 | nur: | ||
18 | ./scripts/make-nur | ||
19 | |||
20 | .PHONY: env env-dry-run nix-info nix-info-nixops | ||
diff --git a/default.nix b/default.nix index c7f515bf..ae27e32e 100644 --- a/default.nix +++ b/default.nix | |||
@@ -4,7 +4,7 @@ let | |||
4 | mypkgs = import ./pkgs { pkgs = pkgs_; }; | 4 | mypkgs = import ./pkgs { pkgs = pkgs_; }; |
5 | in | 5 | in |
6 | { | 6 | { |
7 | lib = import ./libs.nix { pkgs = pkgs_; }; | 7 | lib = import ./lib { pkgs = pkgs_; }; |
8 | modules = import ./modules; | 8 | modules = import ./modules; |
9 | overlays = import ./overlays; | 9 | overlays = import ./overlays; |
10 | pkgs = mypkgs; | 10 | pkgs = mypkgs; |
diff --git a/libs.nix b/lib/default.nix index 48787af1..1baee1f5 100644 --- a/libs.nix +++ b/lib/default.nix | |||
@@ -10,7 +10,7 @@ rec { | |||
10 | in | 10 | in |
11 | (callPackage src {}) // { inherit src; }; | 11 | (callPackage src {}) // { inherit src; }; |
12 | 12 | ||
13 | nodeEnv = import ./lib/node-env.nix; | 13 | nodeEnv = import ./node-env.nix; |
14 | 14 | ||
15 | fetchedGithub = path: | 15 | fetchedGithub = path: |
16 | let | 16 | let |
diff --git a/overlays/default.nix b/overlays/default.nix index 408515ed..42c0386a 100644 --- a/overlays/default.nix +++ b/overlays/default.nix | |||
@@ -1,5 +1,5 @@ | |||
1 | { | 1 | { |
2 | mylibs = self: super: { mylibs = import ../libs.nix { pkgs = self; }; }; | 2 | mylibs = self: super: { mylibs = import ../lib { pkgs = self; }; }; |
3 | mypkgs = self: super: import ../pkgs { pkgs = self; }; | 3 | mypkgs = self: super: import ../pkgs { pkgs = self; }; |
4 | 4 | ||
5 | bitlbee = import ./bitlbee; | 5 | bitlbee = import ./bitlbee; |
diff --git a/pkgs/default.nix b/pkgs/default.nix index 8ea65a5c..297f524d 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix | |||
@@ -1,7 +1,7 @@ | |||
1 | { pkgs }: | 1 | { pkgs }: |
2 | with pkgs; | 2 | with pkgs; |
3 | let | 3 | let |
4 | mylibs = import ../libs.nix { inherit pkgs; }; | 4 | mylibs = import ../lib { inherit pkgs; }; |
5 | in | 5 | in |
6 | rec { | 6 | rec { |
7 | boinctui = callPackage ../pkgs/boinctui {}; | 7 | boinctui = callPackage ../pkgs/boinctui {}; |
diff --git a/fetch_version b/scripts/fetch_version index a0325f63..a0325f63 100755 --- a/fetch_version +++ b/scripts/fetch_version | |||
diff --git a/scripts/make-env b/scripts/make-env index ebb1eed2..983a3590 100755 --- a/scripts/make-env +++ b/scripts/make-env | |||
@@ -2,10 +2,11 @@ | |||
2 | 2 | ||
3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" |
4 | 4 | ||
5 | source $(dirname $DIR)/nix_path_env | 5 | source $DIR/nix_env |
6 | nix-env -r -i -A myEnvironments.immae-eu -f "<nixpkgs>" "$@" | 6 | nix-env -r -i -A myEnvironments.immae-eu -f "<nixpkgs>" "$@" |
7 | result=$? | ||
7 | 8 | ||
8 | cat >> $(dirname $DIR)/versions_log <<EOF | 9 | cat >> $(dirname $DIR)/versions_log <<EOF |
9 | # Ran $(date) with args "$@" | 10 | Ran $(date) with args "$@" and returned "$result" |
10 | $($DIR/nix_infos | sed -e "s/^/# /") | 11 | $($DIR/nix_infos | sed -e "s/^/ /") |
11 | EOF | 12 | EOF |
diff --git a/nix_path_env b/scripts/nix_env index 19f7ccaf..6326243b 100644 --- a/nix_path_env +++ b/scripts/nix_env | |||
@@ -12,6 +12,6 @@ export NIX_PATH="nixpkgs=$nixpkgs:nixpkgsNext=$nixpkgsNext:nixpkgsPrevious=$nixp | |||
12 | 12 | ||
13 | nixops_custom () { | 13 | nixops_custom () { |
14 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | 14 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" |
15 | d=$(nix-build --no-out-link -E "with import <nixpkgs> { overlays = builtins.attrValues (import $DIR/overlays); }; nixops") | 15 | d=$(nix-build --no-out-link -E "with import <nixpkgs> { overlays = builtins.attrValues (import $(dirname $DIR)/overlays); }; nixops") |
16 | ${d}/bin/nixops "$@" | 16 | ${d}/bin/nixops "$@" |
17 | } | 17 | } |
diff --git a/scripts/nix_infos b/scripts/nix_infos index f824305e..56e5b197 100755 --- a/scripts/nix_infos +++ b/scripts/nix_infos | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" |
4 | 4 | ||
5 | source $(dirname $DIR)/nix_path_env | 5 | source $DIR/nix_env |
6 | version=$(nix eval --raw nixpkgs.lib.version) | 6 | version=$(nix eval --raw nixpkgs.lib.version) |
7 | mainversion=$(echo $version | cut -d"." -f -2) | 7 | mainversion=$(echo $version | cut -d"." -f -2) |
8 | 8 | ||