summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2017-05-12 21:54:07 +0200
committerDaiderd Jordan <daiderd@gmail.com>2017-05-12 22:09:04 +0200
commit1546ea0617e4219612f08c6cd933fb0df2680ca6 (patch)
tree617152616bc64440c392ef865bda23b2d6788804 /modules
parent90fd844e73fc7425b87c8c6cf6766ae43fa7b330 (diff)
environment: add pathsToLink for system profile
Diffstat (limited to 'modules')
-rw-r--r--modules/environment/default.nix30
1 files changed, 22 insertions, 8 deletions
diff --git a/modules/environment/default.nix b/modules/environment/default.nix
index 4bcf565..09a3185 100644
--- a/modules/environment/default.nix
+++ b/modules/environment/default.nix
@@ -56,6 +56,13 @@ in {
description = "List of additional package outputs to be symlinked into <filename>/run/current-system/sw</filename>.";
};
+ environment.pathsToLink = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ example = [ "/share/doc" ];
+ description = "List of directories to be symlinked in <filename>/run/current-system/sw</filename>.";
+ };
+
environment.loginShell = mkOption {
type = types.str;
default = "$SHELL";
@@ -112,14 +119,12 @@ in {
config = {
- system.build.setEnvironment = concatStringsSep "\n" exportVariables;
- system.build.setAliases = concatStringsSep "\n" aliasCommands;
-
- system.path = pkgs.buildEnv {
- name = "system-path";
- paths = cfg.systemPackages;
- inherit (cfg) extraOutputsToInstall;
- };
+ environment.pathsToLink =
+ [ "/bin"
+ "/lib"
+ "/share/info"
+ "/share/locale"
+ ];
environment.extraInit = ''
# reset TERM with new TERMINFO available (if any)
@@ -135,5 +140,14 @@ in {
PAGER = mkDefault "less -R";
};
+ system.path = pkgs.buildEnv {
+ name = "system-path";
+ paths = cfg.systemPackages;
+ inherit (cfg) pathsToLink extraOutputsToInstall;
+ };
+
+ system.build.setEnvironment = concatStringsSep "\n" exportVariables;
+ system.build.setAliases = concatStringsSep "\n" aliasCommands;
+
};
}