mirror of
https://github.com/foo-dogsquared/nix-module-wrapper-manager-fds.git
synced 2025-01-31 04:58:17 +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 = {
|
config = {
|
||||||
|
env.PATH = lib.concatStringsSep ":" config.pathAdd;
|
||||||
|
|
||||||
makeWrapperArgs = [
|
makeWrapperArgs = [
|
||||||
"--argv0" config.arg0
|
"--argv0" config.arg0
|
||||||
]
|
]
|
||||||
++ (lib.mapAttrsToList (n: v: "--set ${n} ${v}") config.env)
|
|
||||||
++ (builtins.map (v: "--unset ${v}") config.unset)
|
++ (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: "--add-flags ${v}") config.prependArgs)
|
||||||
++ (builtins.map (v: "--append-flags ${v}") config.appendArgs)
|
++ (builtins.map (v: "--append-flags ${v}") config.appendArgs)
|
||||||
++ (lib.optionals (!envConfig.build.isBinary && config.preScript != "") (
|
++ (lib.optionals (!envConfig.build.isBinary && config.preScript != "") (
|
||||||
|
@ -48,9 +48,10 @@ in
|
|||||||
config.xdg.configDirs = cfg.configDirs;
|
config.xdg.configDirs = cfg.configDirs;
|
||||||
config.xdg.dataDirs = cfg.dataDirs;
|
config.xdg.dataDirs = cfg.dataDirs;
|
||||||
|
|
||||||
config.makeWrapperArgs =
|
config.env = {
|
||||||
builtins.map (v: "--prefix 'XDG_CONFIG_DIRS' ':' ${v}") config.xdg.configDirs
|
XDG_CONFIG_DIRS = lib.concatStringsSep ":" config.xdg.configDirs;
|
||||||
++ (builtins.map (v: "--prefix 'XDG_DATA_DIRS' ':' ${v}") config.xdg.dataDirs);
|
XDG_DATA_DIRS = lib.concatStringsSep ":" config.xdg.dataDirs;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
with lib.types; attrsOf (submodule xdgDirsType);
|
with lib.types; attrsOf (submodule xdgDirsType);
|
||||||
|
Loading…
Reference in New Issue
Block a user