nixos/systemd-repart: add support for repeating settings (#389826)

This commit is contained in:
Arian van Putten
2025-03-14 22:19:19 +00:00
committed by GitHub
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -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"
+2 -1
View File
@@ -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 = { };