mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
files/mutable-files: add postScript
sub-option
This should make it easier to add shell script fragments after each download such as installation of Doom Emacs.
This commit is contained in:
parent
89586650f4
commit
9352d93b79
@ -68,6 +68,17 @@ let
|
||||
default = [ ];
|
||||
example = [ "--depth" "1" ];
|
||||
};
|
||||
|
||||
postScript = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
A shell script fragment to be executed after the download.
|
||||
'';
|
||||
default = "";
|
||||
example = lib.literalExpression ''
|
||||
$${config.xdg.configHome}/emacs/bin/doom install --no-config --no-fonts --install --force
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
@ -139,6 +150,7 @@ in
|
||||
[ -e ${path} ] || gopass clone ${extraArgs} ${url} --path ${path} ${extraArgs}
|
||||
''}
|
||||
${isFetchType "custom" "[ -e ${path} ] || ${extraArgs}"}
|
||||
${value.postScript}
|
||||
'')
|
||||
cfg;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user