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

authored by Arian van Putten and committed by GitHub c56cc16a 2fb241ac

+4 -3
+2 -2
nixos/modules/image/repart.nix
··· 48 }; 49 50 repartConfig = lib.mkOption { 51 - type = with lib.types; attrsOf (oneOf [ str int bool ]); 52 example = { 53 Type = "home"; 54 SizeMinBytes = "512M"; ··· 311 (lib.mapAttrsToList (_n: v: v.repartConfig.Format or null) cfg.partitions); 312 313 314 - format = pkgs.formats.ini { }; 315 316 definitionsDirectory = utils.systemdUtils.lib.definitions 317 "repart.d"
··· 48 }; 49 50 repartConfig = lib.mkOption { 51 + type = with lib.types; attrsOf (oneOf [ str int bool (listOf str) ]); 52 example = { 53 Type = "home"; 54 SizeMinBytes = "512M"; ··· 311 (lib.mapAttrsToList (_n: v: v.repartConfig.Format or null) cfg.partitions); 312 313 314 + format = pkgs.formats.ini { listsAsDuplicateKeys = true; }; 315 316 definitionsDirectory = utils.systemdUtils.lib.definitions 317 "repart.d"
+2 -1
nixos/modules/system/boot/systemd/repart.nix
··· 10 cfg = config.systemd.repart; 11 initrdCfg = config.boot.initrd.systemd.repart; 12 13 - format = pkgs.formats.ini { }; 14 15 definitionsDirectory = utils.systemdUtils.lib.definitions "repart.d" format ( 16 lib.mapAttrs (_n: v: { Partition = v; }) cfg.partitions ··· 93 str 94 int 95 bool 96 ]) 97 ); 98 default = { };
··· 10 cfg = config.systemd.repart; 11 initrdCfg = config.boot.initrd.systemd.repart; 12 13 + format = pkgs.formats.ini { listsAsDuplicateKeys = true; }; 14 15 definitionsDirectory = utils.systemdUtils.lib.definitions "repart.d" format ( 16 lib.mapAttrs (_n: v: { Partition = v; }) cfg.partitions ··· 93 str 94 int 95 bool 96 + (listOf str) 97 ]) 98 ); 99 default = { };