mirror of
https://github.com/foo-dogsquared/nix-module-wrapper-manager-fds.git
synced 2025-01-30 22:57:58 +00:00
wrapper-manager-fds/modules: update PATH and XDG dirs to be a part of env
instead
This makes it easier to work with for custom modules.
This commit is contained in:
parent
9639a16a65
commit
aef2ac2825
@ -118,12 +118,13 @@ let
|
||||
};
|
||||
|
||||
config = {
|
||||
env.PATH = lib.concatStringsSep ":" config.pathAdd;
|
||||
|
||||
makeWrapperArgs = [
|
||||
"--argv0" config.arg0
|
||||
]
|
||||
++ (lib.mapAttrsToList (n: v: "--set ${n} ${v}") config.env)
|
||||
++ (builtins.map (v: "--unset ${v}") config.unset)
|
||||
++ (builtins.map (v: "--prefix 'PATH' ':' ${v}") config.pathAdd)
|
||||
++ (lib.mapAttrsToList (n: v: "--set ${n} ${v}") config.env)
|
||||
++ (builtins.map (v: "--add-flags ${v}") config.prependArgs)
|
||||
++ (builtins.map (v: "--append-flags ${v}") config.appendArgs)
|
||||
++ (lib.optionals (!envConfig.build.isBinary && config.preScript != "") (
|
||||
|
@ -48,9 +48,10 @@ in
|
||||
config.xdg.configDirs = cfg.configDirs;
|
||||
config.xdg.dataDirs = cfg.dataDirs;
|
||||
|
||||
config.makeWrapperArgs =
|
||||
builtins.map (v: "--prefix 'XDG_CONFIG_DIRS' ':' ${v}") config.xdg.configDirs
|
||||
++ (builtins.map (v: "--prefix 'XDG_DATA_DIRS' ':' ${v}") config.xdg.dataDirs);
|
||||
config.env = {
|
||||
XDG_CONFIG_DIRS = lib.concatStringsSep ":" config.xdg.configDirs;
|
||||
XDG_DATA_DIRS = lib.concatStringsSep ":" config.xdg.dataDirs;
|
||||
};
|
||||
};
|
||||
in
|
||||
with lib.types; attrsOf (submodule xdgDirsType);
|
||||
|
Loading…
Reference in New Issue
Block a user