diff --git a/system/options.nix b/system/options.nix index fee70d3311eb..9232e9a8c52d 100644 --- a/system/options.nix +++ b/system/options.nix @@ -1578,6 +1578,14 @@ root ALL=(ALL) SETENV: ALL environment = { + pathsToLink = mkOption { + default = ["/bin" "/sbin" "/share"]; + example = ["/"]; + description = " + This allows to symlink more directories in /var/run/current-system/sw + "; + }; + extraPackages = mkOption { default = pkgs: []; example = pkgs: [pkgs.firefox pkgs.thunderbird]; diff --git a/system/system.nix b/system/system.nix index 9e67236522da..311ddaf0a1e1 100644 --- a/system/system.nix +++ b/system/system.nix @@ -257,7 +257,7 @@ rec { systemPath = pkgs.buildEnv { name = "system-path"; paths = systemPathList; - pathsToLink = ["/bin" "/sbin" "/man" "/share"]; + inherit (config.environment) pathsToLink; ignoreCollisions = true; };