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