]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Add config dir to be linked to ~/.config/nixpkgs
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Sat, 16 Feb 2019 11:21:47 +0000 (12:21 +0100)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Sat, 16 Feb 2019 11:27:36 +0000 (12:27 +0100)
config/README.md [new file with mode: 0644]
config/config.nix [new file with mode: 0644]
config/nixRoot [new symlink]
default.nix
scripts/make-env [new file with mode: 0755]

diff --git a/config/README.md b/config/README.md
new file mode 100644 (file)
index 0000000..542f31e
--- /dev/null
@@ -0,0 +1 @@
+Link this directory to ~/.config/nixpkgs
diff --git a/config/config.nix b/config/config.nix
new file mode 100644 (file)
index 0000000..0b57835
--- /dev/null
@@ -0,0 +1,13 @@
+{
+  packageOverrides = pkgs: with pkgs; {
+    # buildEnv is not absolutely equivalent to
+    # `nix-env -i -f ./nixRoot/default.nix`, see
+    # https://github.com/NixOS/nix/issues/2682
+    immaePackages = pkgs.buildEnv {
+      name = "Immae-packages";
+      paths = builtins.attrValues (import ./nixRoot/default.nix);
+      pathsToLink = [ "/bin" "/etc" "/include" "/lib" "/libexec" "/share"];
+      extraOutputsToInstall = [ "bin" "man" "doc" "info" ];
+    };
+  };
+}
diff --git a/config/nixRoot b/config/nixRoot
new file mode 120000 (symlink)
index 0000000..a96aa0e
--- /dev/null
@@ -0,0 +1 @@
+..
\ No newline at end of file
index beb10b88cfed8315241c61095470f8130a74a6c5..538ffaa683f111807d8f2f99e1d046786e57a454 100644 (file)
@@ -365,6 +365,7 @@ in
     inherit nixops;
     inherit urlview;
     inherit rr;
+    inherit nix-zsh-completions;
     stgit = gitAndTools.stgit;
     # todo: lx* ?, unrar, unzip, zeromq?
     #inherit nextcloud-client;
diff --git a/scripts/make-env b/scripts/make-env
new file mode 100755 (executable)
index 0000000..d374c31
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+nix-env -r -i -A immaePackages -f "<nixpkgs>"