mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-12 06:19:00 +00:00
home-manager/files/mutable-files: properly group fetch subscripts
This commit is contained in:
parent
c08289419c
commit
51f52dc3f9
@ -35,13 +35,7 @@ let
|
|||||||
[ -e ${path} ] || gopass clone ${extraArgs} ${url} --path ${path} ${extraArgs}
|
[ -e ${path} ] || gopass clone ${extraArgs} ${url} --path ${path} ${extraArgs}
|
||||||
'';
|
'';
|
||||||
custom = ''
|
custom = ''
|
||||||
# Allow the extra arguments to make use of the URL and path thru
|
[ -e ${path} ] || ${extraArgs}
|
||||||
# variables.
|
|
||||||
(
|
|
||||||
url=${url}
|
|
||||||
path=${path}
|
|
||||||
[ -e ${path} ] || ${extraArgs}
|
|
||||||
)
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -169,8 +163,19 @@ in
|
|||||||
ExecStart =
|
ExecStart =
|
||||||
let
|
let
|
||||||
mutableFilesCmds = lib.mapAttrsToList
|
mutableFilesCmds = lib.mapAttrsToList
|
||||||
(path: value:
|
(path: value: let
|
||||||
(fetchScript path value).${value.type})
|
url = lib.escapeShellArg value.url;
|
||||||
|
path = lib.escapeShellArg value.path;
|
||||||
|
in
|
||||||
|
''
|
||||||
|
(
|
||||||
|
URL=${url}
|
||||||
|
PATH=${path}
|
||||||
|
DIRNAME=$(dirname ${path})
|
||||||
|
mkdir -p "$DIRNAME"
|
||||||
|
${(fetchScript path value).${value.type}}
|
||||||
|
)
|
||||||
|
'')
|
||||||
cfg;
|
cfg;
|
||||||
|
|
||||||
script = pkgs.writeShellApplication {
|
script = pkgs.writeShellApplication {
|
||||||
|
Loading…
Reference in New Issue
Block a user