summaryrefslogtreecommitdiffstats
path: root/nixos/modules/services
diff options
context:
space:
mode:
authorChristoph Heiss <christoph@c8h4.io>2023-08-07 21:15:35 +0200
committerChristoph Heiss <christoph@c8h4.io>2023-11-11 13:01:47 +0100
commit78cc2783c8e8322e80cd0ee68409cd537e7202a6 (patch)
tree9afc96e8d6efbcd50d7dc3c8f96be1c496bfdfcf /nixos/modules/services
parent6b25e09d2dfe8b92db9ae148989d6d7aaad2dd7f (diff)
sourcehut: drop obsolete `services` array in favor of indivdual `enable` flags
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
Diffstat (limited to 'nixos/modules/services')
-rw-r--r--nixos/modules/services/misc/sourcehut/default.nix15
-rw-r--r--nixos/modules/services/misc/sourcehut/service.nix3
2 files changed, 5 insertions, 13 deletions
diff --git a/nixos/modules/services/misc/sourcehut/default.nix b/nixos/modules/services/misc/sourcehut/default.nix
index abe2370483c6..293ab4ada841 100644
--- a/nixos/modules/services/misc/sourcehut/default.nix
+++ b/nixos/modules/services/misc/sourcehut/default.nix
@@ -25,7 +25,7 @@ let
|| head srvMatch == srv # Include sections for the service being configured
then v
# Enable Web links and integrations between services.
- else if tail srvMatch == [ null ] && elem (head srvMatch) cfg.services
+ else if tail srvMatch == [ null ] && cfg.${head srvMatch}.enable
then {
inherit (v) origin;
# mansrht crashes without it
@@ -120,15 +120,6 @@ in
and account management services
'');
- services = mkOption {
- type = with types; listOf (enum
- [ "builds" "git" "hg" "hub" "lists" "man" "meta" "pages" "paste" "todo" ]);
- defaultText = "locally enabled services";
- description = lib.mdDoc ''
- Services that may be displayed as links in the title bar of the Web interface.
- '';
- };
-
listenAddress = mkOption {
type = types.str;
default = "localhost";
@@ -1371,6 +1362,10 @@ in
dispatch is deprecated. See https://sourcehut.org/blog/2022-08-01-dispatch-deprecation-plans/
for more information.
'')
+
+ (mkRemovedOptionModule [ "services" "sourcehut" "services"] ''
+ This option was removed in favor of individual <service>.enable flags.
+ '')
];
meta.doc = ./default.md;
diff --git a/nixos/modules/services/misc/sourcehut/service.nix b/nixos/modules/services/misc/sourcehut/service.nix
index 26fbb3a11362..dcd76f898f9f 100644
--- a/nixos/modules/services/misc/sourcehut/service.nix
+++ b/nixos/modules/services/misc/sourcehut/service.nix
@@ -255,9 +255,6 @@ in
}) [srvCfg.user];
};
- services.sourcehut.services = mkDefault (filter (s: cfg.${s}.enable)
- [ "builds" "dispatch" "git" "hg" "hub" "lists" "man" "meta" "pages" "paste" "todo" ]);
-
services.sourcehut.settings = mkMerge [
{
"${srv}.sr.ht".origin = mkDefault "https://${srv}.${cfg.settings."sr.ht".global-domain}";