Remove extraLinkPaths, thanks to Pierron for explanation

Now pathsToLink=["/include"] in configuration.nix will add /include instead of overwriting.

svn path=/nixos/trunk/; revision=21111
This commit is contained in:
Yury G. Kudryashov 2010-04-16 05:09:10 +00:00
parent c423f16f69
commit 8e8554242f
2 changed files with 7 additions and 14 deletions

View File

@ -7,6 +7,7 @@ with pkgs.lib;
let let
cfg = config.environment;
requiredPackages = requiredPackages =
[ config.system.sbin.modprobe # must take precedence over module_init_tools [ config.system.sbin.modprobe # must take precedence over module_init_tools
config.system.sbin.mount # must take precedence over util-linux config.system.sbin.mount # must take precedence over util-linux
@ -79,27 +80,18 @@ let
pathsToLink = mkOption { pathsToLink = mkOption {
# Note: We need `/lib' to be among `pathsToLink' for NSS modules # Note: We need `/lib' to be among `pathsToLink' for NSS modules
# to work. # to work.
default = ["/bin" "/sbin" "/lib" "/share/man" "/share/info" "/man" "/info"]; default = [];
example = ["/"]; example = ["/"];
description = " description = "
Lists directories to be symlinked in `/var/run/current-system/sw'. Lists directories to be symlinked in `/var/run/current-system/sw'.
Use extraLinkPaths if you want just to add some additional paths.
"; ";
}; };
extraLinkPaths = mkOption {
default = [];
example = ["/"];
description = "
Extra directories to be symlinked in /var/run/current-system/sw.
";
};
}; };
system = { system = {
path = mkOption { path = mkOption {
default = config.environment.systemPackages; default = cfg.systemPackages;
description = '' description = ''
The packages you want in the boot environment. The packages you want in the boot environment.
''; '';
@ -107,7 +99,7 @@ let
name = "system-path"; name = "system-path";
paths = list; paths = list;
pathsToLink = with config.environment; pathsToLink ++ extraLinkPaths; inherit (cfg) pathsToLink;
ignoreCollisions = true; ignoreCollisions = true;
}; };
@ -124,4 +116,5 @@ in
require = [options]; require = [options];
environment.systemPackages = requiredPackages; environment.systemPackages = requiredPackages;
environment.pathsToLink = ["/bin" "/sbin" "/lib" "/share/man" "/share/info" "/man" "/info"];
} }

View File

@ -1,7 +1,7 @@
{pkgs, config, ...}: {pkgs, config, ...}:
let let
inherit (pkgs.lib) mkOption mkIf types; inherit (pkgs.lib) mkDefaultValue mkOption mkIf types;
kdePackages = config.environment.kdePackages; kdePackages = config.environment.kdePackages;
options = { options = {
@ -30,6 +30,6 @@ mkIf (kdePackages != [] && config.services.xserver.enable) {
environment = { environment = {
x11Packages = kdePackages; x11Packages = kdePackages;
systemPackages = kdePackages; systemPackages = kdePackages;
extraLinkPaths = [ "/share" "/plugins" ]; pathsToLink = [ "/share" "/plugins" ];
}; };
} }