Unverified Commit 78cc2783 authored by Christoph Heiss's avatar Christoph Heiss
Browse files

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

parent 6b25e09d
Loading
Loading
Loading
Loading
+5 −10
Original line number Diff line number Diff line
@@ -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;
+0 −3
Original line number Diff line number Diff line
@@ -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}";
+0 −5
Original line number Diff line number Diff line
@@ -134,11 +134,6 @@ in

    services.sourcehut = {
      enable = true;
      services = [
        "builds"
        "git"
        "meta"
      ];
      nginx.enable = true;
      nginx.virtualHost = {
        forceSSL = true;