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:
parent
90fd844e73
commit
1546ea0617
1 changed files with 22 additions and 8 deletions
|
@ -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;
|
||||
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue