factor out do_append in prep for delta subcommands
This commit is contained in:
parent
8477c73067
commit
9ae0630db4
8 changed files with 237 additions and 56 deletions
45
dynamic-submodule.nix
Normal file
45
dynamic-submodule.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
name,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules)
|
||||
mkIf
|
||||
;
|
||||
inherit (lib.options)
|
||||
mkOption
|
||||
mkEnableOption
|
||||
literalExpression
|
||||
;
|
||||
t = lib.types;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
enable = mkEnableOption "Dynamicism for ${name}";
|
||||
|
||||
source-parameters = mkOption {
|
||||
type = t.listOf t.str;
|
||||
description = "An attrpath of the NixOS option this dynamicism uses";
|
||||
example = literalExpression ''
|
||||
[ "services" "gotosocial" "settings" ]
|
||||
'';
|
||||
};
|
||||
|
||||
systemd-services-updated = mkOption {
|
||||
type = t.listOf t.str;
|
||||
description = ''
|
||||
A list of systemd unit names (including the suffix, e.g. `.service`) that need to be updated.
|
||||
'';
|
||||
example = literalExpression ''
|
||||
"gotosocial.service"
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf config.enable {
|
||||
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue