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

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
Christoph Heiss
2023-11-11 13:01:47 +01:00
parent 6b25e09d2d
commit 78cc2783c8
3 changed files with 5 additions and 18 deletions
@@ -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;
@@ -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}";
-5
View File
@@ -134,11 +134,6 @@ in
services.sourcehut = {
enable = true;
services = [
"builds"
"git"
"meta"
];
nginx.enable = true;
nginx.virtualHost = {
forceSSL = true;