summary refs log tree commit diff
diff options
context:
space:
mode:
authorJonas Heinrich <onny@project-insanity.org>2022-01-15 18:38:20 +0100
committerGitHub <noreply@github.com>2022-01-16 02:38:20 +0900
commit75d417c267b51c51587ec67af71b8a98ca358123 (patch)
treedc2eee3157a0fd32a578c183fb2efbffa80920ce
parent60dec7aa319dc620cd77ecae8ce48f5374450452 (diff)
downloadnixpkgs-75d417c267b51c51587ec67af71b8a98ca358123.tar
nixpkgs-75d417c267b51c51587ec67af71b8a98ca358123.tar.gz
nixpkgs-75d417c267b51c51587ec67af71b8a98ca358123.tar.bz2
nixpkgs-75d417c267b51c51587ec67af71b8a98ca358123.tar.lz
nixpkgs-75d417c267b51c51587ec67af71b8a98ca358123.tar.xz
nixpkgs-75d417c267b51c51587ec67af71b8a98ca358123.tar.zst
nixpkgs-75d417c267b51c51587ec67af71b8a98ca358123.zip
nixos/dokuwiki: Drop deprecated old interface (#152676)
-rw-r--r--nixos/doc/manual/from_md/release-notes/rl-2205.section.xml8
-rw-r--r--nixos/doc/manual/release-notes/rl-2205.section.md3
-rw-r--r--nixos/modules/services/web-apps/dokuwiki.nix17
3 files changed, 14 insertions, 14 deletions
diff --git a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml
index 85523621e88..f3bd0dfbdbc 100644
--- a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml
+++ b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml
@@ -254,6 +254,14 @@
       </listitem>
       <listitem>
         <para>
+          The backward compatibility in
+          <literal>services.dokuwiki</literal> to configure sites with
+          the old interface has been removed. Please use
+          <literal>services.dokuwiki.sites</literal> instead.
+        </para>
+      </listitem>
+      <listitem>
+        <para>
           opensmtpd-extras is no longer build with python2 scripting
           support due to python2 deprecation in nixpkgs
         </para>
diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md
index e004de8f916..58c8939feee 100644
--- a/nixos/doc/manual/release-notes/rl-2205.section.md
+++ b/nixos/doc/manual/release-notes/rl-2205.section.md
@@ -83,6 +83,9 @@ In addition to numerous new and upgraded packages, this release has the followin
 
 - If you previously used `/etc/docker/daemon.json`, you need to incorporate the changes into the new option `virtualisation.docker.daemon.settings`.
 
+- The backward compatibility in `services.dokuwiki` to configure sites with the
+  old interface has been removed. Please use `services.dokuwiki.sites` instead.
+
 - opensmtpd-extras is no longer build with python2 scripting support due to python2 deprecation in nixpkgs
 
 - The `autorestic` package has been upgraded from 1.3.0 to 1.5.0 which introduces breaking changes in config file, check [their migration guide](https://autorestic.vercel.app/migration/1.4_1.5) for more details.
diff --git a/nixos/modules/services/web-apps/dokuwiki.nix b/nixos/modules/services/web-apps/dokuwiki.nix
index 9b9ae931f9a..392748a93e0 100644
--- a/nixos/modules/services/web-apps/dokuwiki.nix
+++ b/nixos/modules/services/web-apps/dokuwiki.nix
@@ -1,20 +1,14 @@
 { config, pkgs, lib, ... }:
 
-let
-  inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption types maintainers recursiveUpdate;
-  inherit (lib) any attrValues concatMapStrings concatMapStringsSep flatten literalExpression;
-  inherit (lib) filterAttrs mapAttrs mapAttrs' mapAttrsToList nameValuePair optional optionalAttrs optionalString;
+with lib;
 
-  cfg = migrateOldAttrs config.services.dokuwiki;
+let
+  cfg = config.services.dokuwiki;
   eachSite = cfg.sites;
   user = "dokuwiki";
   webserver = config.services.${cfg.webserver};
   stateDir = hostName: "/var/lib/dokuwiki/${hostName}/data";
 
-  # Migrate config.services.dokuwiki.<hostName> to config.services.dokuwiki.sites.<hostName>
-  oldSites = filterAttrs (o: _: o != "sites" && o != "webserver");
-  migrateOldAttrs = cfg: cfg // { sites = cfg.sites // oldSites cfg; };
-
   dokuwikiAclAuthConfig = hostName: cfg: pkgs.writeText "acl.auth-${hostName}.php" ''
     # acl.auth.php
     # <?php exit()?>
@@ -257,10 +251,7 @@ in
   options = {
     services.dokuwiki = mkOption {
       type = types.submodule {
-        # Used to support old interface
-        freeformType = types.attrsOf (types.submodule siteOpts);
 
-        # New interface
         options.sites = mkOption {
           type = types.attrsOf (types.submodule siteOpts);
           default = {};
@@ -301,8 +292,6 @@ in
     }
     ]) eachSite);
 
-    warnings = mapAttrsToList (hostName: _: ''services.dokuwiki."${hostName}" is deprecated use services.dokuwiki.sites."${hostName}"'') (oldSites cfg);
-
     services.phpfpm.pools = mapAttrs' (hostName: cfg: (
       nameValuePair "dokuwiki-${hostName}" {
         inherit user;