nixos/systemd-repart: add support for repeating settings (#389826)
This commit is contained in:
@@ -48,7 +48,7 @@ let
|
||||
};
|
||||
|
||||
repartConfig = lib.mkOption {
|
||||
type = with lib.types; attrsOf (oneOf [ str int bool ]);
|
||||
type = with lib.types; attrsOf (oneOf [ str int bool (listOf str) ]);
|
||||
example = {
|
||||
Type = "home";
|
||||
SizeMinBytes = "512M";
|
||||
@@ -311,7 +311,7 @@ in
|
||||
(lib.mapAttrsToList (_n: v: v.repartConfig.Format or null) cfg.partitions);
|
||||
|
||||
|
||||
format = pkgs.formats.ini { };
|
||||
format = pkgs.formats.ini { listsAsDuplicateKeys = true; };
|
||||
|
||||
definitionsDirectory = utils.systemdUtils.lib.definitions
|
||||
"repart.d"
|
||||
|
||||
@@ -10,7 +10,7 @@ let
|
||||
cfg = config.systemd.repart;
|
||||
initrdCfg = config.boot.initrd.systemd.repart;
|
||||
|
||||
format = pkgs.formats.ini { };
|
||||
format = pkgs.formats.ini { listsAsDuplicateKeys = true; };
|
||||
|
||||
definitionsDirectory = utils.systemdUtils.lib.definitions "repart.d" format (
|
||||
lib.mapAttrs (_n: v: { Partition = v; }) cfg.partitions
|
||||
@@ -93,6 +93,7 @@ in
|
||||
str
|
||||
int
|
||||
bool
|
||||
(listOf str)
|
||||
])
|
||||
);
|
||||
default = { };
|
||||
|
||||
Reference in New Issue
Block a user