]> git.immae.eu Git - perso/Immae/Config/Nix/NUR.git/commitdiff
Reorganize files
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Fri, 24 May 2019 12:43:09 +0000 (14:43 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Fri, 24 Apr 2020 22:04:21 +0000 (00:04 +0200)
Makefile [new file with mode: 0644]
default.nix
lib/default.nix [moved from libs.nix with 98% similarity]
overlays/default.nix
pkgs/default.nix
scripts/fetch_version [moved from fetch_version with 100% similarity]
scripts/make-env
scripts/nix_env [moved from nix_path_env with 89% similarity]
scripts/nix_infos

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..f4bb3f5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+subrecipes = setup ssh-eldiron info debug dry-run build upload deploy reboot push pull pull-deployment list-generations delete-generations cleanup
+${subrecipes}:
+       @$(MAKE) --no-print-directory -C nixops/ $@
+
+env:
+       ./scripts/make-env
+
+env-dry-run:
+       ./scripts/make-env --dry-run
+
+nix-info:
+       NIXOPS_DEPLOYMENT="" ./scripts/nix_infos
+
+nix-info-nixops:
+       NIXOPS_DEPLOYMENT="n" ./scripts/nix_infos
+
+nur:
+       ./scripts/make-nur
+
+.PHONY: env env-dry-run nix-info nix-info-nixops
index c7f515bf43d685d37442117e438caca286a6f9a9..ae27e32e88df242ff0089a6d405314c1eca6a151 100644 (file)
@@ -4,7 +4,7 @@ let
   mypkgs = import ./pkgs { pkgs = pkgs_; };
 in
 {
-  lib = import ./libs.nix { pkgs = pkgs_; };
+  lib = import ./lib { pkgs = pkgs_; };
   modules = import ./modules;
   overlays = import ./overlays;
   pkgs = mypkgs;
similarity index 98%
rename from libs.nix
rename to lib/default.nix
index 48787af10ef1295ed621092950635e9607aee678..1baee1f53e79cea08a6611fc87a28ead8e247520 100644 (file)
--- a/libs.nix
@@ -10,7 +10,7 @@ rec {
   in
     (callPackage src {}) // { inherit src; };
 
-  nodeEnv = import ./lib/node-env.nix;
+  nodeEnv = import ./node-env.nix;
 
   fetchedGithub = path:
     let
index 408515ed4c261399ec6ce4b46853ac9052e611c4..42c0386a9da3c178cb61eca2f49a199b397307d6 100644 (file)
@@ -1,5 +1,5 @@
 {
-  mylibs = self: super: { mylibs = import ../libs.nix { pkgs = self; }; };
+  mylibs = self: super: { mylibs = import ../lib { pkgs = self; }; };
   mypkgs = self: super: import ../pkgs { pkgs = self; };
 
   bitlbee = import ./bitlbee;
index 8ea65a5ce1f6c601804eff073228686b28c73168..297f524d469f317d1f33fe8c8637eaaee7883afd 100644 (file)
@@ -1,7 +1,7 @@
 { pkgs }:
 with pkgs;
 let
-  mylibs = import ../libs.nix { inherit pkgs; };
+  mylibs = import ../lib { inherit pkgs; };
 in
 rec {
   boinctui = callPackage ../pkgs/boinctui {};
similarity index 100%
rename from fetch_version
rename to scripts/fetch_version
index ebb1eed2ec1ad9ef2cc92069ac6f38995ff306ee..983a3590ec67ce76d919bd1afcc9dc3e6e7d875d 100755 (executable)
@@ -2,10 +2,11 @@
 
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
 
-source $(dirname $DIR)/nix_path_env
+source $DIR/nix_env
 nix-env -r -i -A myEnvironments.immae-eu -f "<nixpkgs>" "$@"
+result=$?
 
 cat >> $(dirname $DIR)/versions_log <<EOF
-# Ran $(date) with args "$@"
-$($DIR/nix_infos | sed -e "s/^/#   /")
+Ran $(date) with args "$@" and returned "$result"
+$($DIR/nix_infos | sed -e "s/^/    /")
 EOF
similarity index 89%
rename from nix_path_env
rename to scripts/nix_env
index 19f7ccaf5ddda3e94db79ae4eda8c08b0f58ebeb..6326243b6bb694a7b2505b663f67f0aef8b5f481 100644 (file)
@@ -12,6 +12,6 @@ export NIX_PATH="nixpkgs=$nixpkgs:nixpkgsNext=$nixpkgsNext:nixpkgsPrevious=$nixp
 
 nixops_custom () {
   DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-  d=$(nix-build --no-out-link -E "with import <nixpkgs> { overlays = builtins.attrValues (import $DIR/overlays); }; nixops")
+  d=$(nix-build --no-out-link -E "with import <nixpkgs> { overlays = builtins.attrValues (import $(dirname $DIR)/overlays); }; nixops")
   ${d}/bin/nixops "$@"
 }
index f824305ebdb305265ce18704a9fa756a96ee8b63..56e5b19774d75004fb4c19b5ab617a95ce021dc3 100755 (executable)
@@ -2,7 +2,7 @@
 
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
 
-source $(dirname $DIR)/nix_path_env
+source $DIR/nix_env
 version=$(nix eval --raw nixpkgs.lib.version)
 mainversion=$(echo $version | cut -d"." -f -2)