From 75d417c267b51c51587ec67af71b8a98ca358123 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Sat, 15 Jan 2022 18:38:20 +0100 Subject: nixos/dokuwiki: Drop deprecated old interface (#152676) --- .../manual/from_md/release-notes/rl-2205.section.xml | 8 ++++++++ nixos/doc/manual/release-notes/rl-2205.section.md | 3 +++ nixos/modules/services/web-apps/dokuwiki.nix | 17 +++-------------- 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 @@ -252,6 +252,14 @@ 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 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. to config.services.dokuwiki.sites. - 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 # @@ -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; -- cgit 1.4.1