nixos/systemd-tmpfiles: use types.attrsWith for settings (#363939)

This commit is contained in:
WilliButz
2024-12-12 15:54:31 +01:00
committed by GitHub
@@ -7,6 +7,10 @@ let
initrdCfg = config.boot.initrd.systemd.tmpfiles;
systemd = config.systemd.package;
attrsWith' = placeholder: elemType: types.attrsWith {
inherit elemType placeholder;
};
settingsOption = {
description = ''
Declare systemd-tmpfiles rules to create, delete, and clean up volatile
@@ -25,7 +29,7 @@ let
};
};
default = {};
type = types.attrsOf (types.attrsOf (types.attrsOf (types.submodule ({ name, config, ... }: {
type = attrsWith' "config-name" (attrsWith' "tmpfiles-type" (attrsWith' "path" (types.submodule ({ name, config, ... }: {
options.type = mkOption {
type = types.str;
default = name;