lol

sourcehut: drop obsolete `services` array in favor of indivdual `enable` flags

Signed-off-by: Christoph Heiss <christoph@c8h4.io>

+5 -18
+5 -10
nixos/modules/services/misc/sourcehut/default.nix
··· 25 25 || head srvMatch == srv # Include sections for the service being configured 26 26 then v 27 27 # Enable Web links and integrations between services. 28 - else if tail srvMatch == [ null ] && elem (head srvMatch) cfg.services 28 + else if tail srvMatch == [ null ] && cfg.${head srvMatch}.enable 29 29 then { 30 30 inherit (v) origin; 31 31 # mansrht crashes without it ··· 119 119 sourcehut - git hosting, continuous integration, mailing list, ticket tracking, wiki 120 120 and account management services 121 121 ''); 122 - 123 - services = mkOption { 124 - type = with types; listOf (enum 125 - [ "builds" "git" "hg" "hub" "lists" "man" "meta" "pages" "paste" "todo" ]); 126 - defaultText = "locally enabled services"; 127 - description = lib.mdDoc '' 128 - Services that may be displayed as links in the title bar of the Web interface. 129 - ''; 130 - }; 131 122 132 123 listenAddress = mkOption { 133 124 type = types.str; ··· 1370 1361 (mkRemovedOptionModule [ "services" "sourcehut" "dispatch" ] '' 1371 1362 dispatch is deprecated. See https://sourcehut.org/blog/2022-08-01-dispatch-deprecation-plans/ 1372 1363 for more information. 1364 + '') 1365 + 1366 + (mkRemovedOptionModule [ "services" "sourcehut" "services"] '' 1367 + This option was removed in favor of individual <service>.enable flags. 1373 1368 '') 1374 1369 ]; 1375 1370
-3
nixos/modules/services/misc/sourcehut/service.nix
··· 255 255 }) [srvCfg.user]; 256 256 }; 257 257 258 - services.sourcehut.services = mkDefault (filter (s: cfg.${s}.enable) 259 - [ "builds" "dispatch" "git" "hg" "hub" "lists" "man" "meta" "pages" "paste" "todo" ]); 260 - 261 258 services.sourcehut.settings = mkMerge [ 262 259 { 263 260 "${srv}.sr.ht".origin = mkDefault "https://${srv}.${cfg.settings."sr.ht".global-domain}";
-5
nixos/tests/sourcehut.nix
··· 134 134 135 135 services.sourcehut = { 136 136 enable = true; 137 - services = [ 138 - "builds" 139 - "git" 140 - "meta" 141 - ]; 142 137 nginx.enable = true; 143 138 nginx.virtualHost = { 144 139 forceSSL = true;