1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-13 20:30:02 +00:00

environment: add pathsToLink for system profile

This commit is contained in:
Daiderd Jordan 2017-05-12 21:54:07 +02:00
parent 90fd844e73
commit 1546ea0617
No known key found for this signature in database
GPG key ID: D02435D05B810C96

View file

@ -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;
};
}