sourcehut: drop obsolete services array in favor of indivdual enable flags
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
@@ -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}";
|
||||
|
||||
@@ -134,11 +134,6 @@ in
|
||||
|
||||
services.sourcehut = {
|
||||
enable = true;
|
||||
services = [
|
||||
"builds"
|
||||
"git"
|
||||
"meta"
|
||||
];
|
||||
nginx.enable = true;
|
||||
nginx.virtualHost = {
|
||||
forceSSL = true;
|
||||
|
||||
Reference in New Issue
Block a user