From ea9d3f4ba1cfcab0eeb9cb719fc8065d38c3bb53 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 16 Feb 2019 12:21:47 +0100 Subject: [PATCH] Add config dir to be linked to ~/.config/nixpkgs --- config/README.md | 1 + config/config.nix | 13 +++++++++++++ config/nixRoot | 1 + default.nix | 1 + scripts/make-env | 3 +++ 5 files changed, 19 insertions(+) create mode 100644 config/README.md create mode 100644 config/config.nix create mode 120000 config/nixRoot create mode 100755 scripts/make-env diff --git a/config/README.md b/config/README.md new file mode 100644 index 0000000..542f31e --- /dev/null +++ b/config/README.md @@ -0,0 +1 @@ +Link this directory to ~/.config/nixpkgs diff --git a/config/config.nix b/config/config.nix new file mode 100644 index 0000000..0b57835 --- /dev/null +++ b/config/config.nix @@ -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 index 0000000..a96aa0e --- /dev/null +++ b/config/nixRoot @@ -0,0 +1 @@ +.. \ No newline at end of file diff --git a/default.nix b/default.nix index beb10b8..538ffaa 100644 --- a/default.nix +++ b/default.nix @@ -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 index 0000000..d374c31 --- /dev/null +++ b/scripts/make-env @@ -0,0 +1,3 @@ +#!/bin/bash + +nix-env -r -i -A immaePackages -f "" -- 2.41.0