mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-21 08:59:20 +03:00
nixos/dokuwiki: Drop deprecated old interface (#152676)
This commit is contained in:
parent
60dec7aa31
commit
75d417c267
3 changed files with 14 additions and 14 deletions
|
@ -252,6 +252,14 @@
|
||||||
<literal>virtualisation.docker.daemon.settings</literal>.
|
<literal>virtualisation.docker.daemon.settings</literal>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</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>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
opensmtpd-extras is no longer build with python2 scripting
|
opensmtpd-extras is no longer build with python2 scripting
|
||||||
|
|
|
@ -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`.
|
- 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
|
- 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.
|
- 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.
|
||||||
|
|
|
@ -1,20 +1,14 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
with lib;
|
||||||
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;
|
|
||||||
|
|
||||||
cfg = migrateOldAttrs config.services.dokuwiki;
|
let
|
||||||
|
cfg = config.services.dokuwiki;
|
||||||
eachSite = cfg.sites;
|
eachSite = cfg.sites;
|
||||||
user = "dokuwiki";
|
user = "dokuwiki";
|
||||||
webserver = config.services.${cfg.webserver};
|
webserver = config.services.${cfg.webserver};
|
||||||
stateDir = hostName: "/var/lib/dokuwiki/${hostName}/data";
|
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" ''
|
dokuwikiAclAuthConfig = hostName: cfg: pkgs.writeText "acl.auth-${hostName}.php" ''
|
||||||
# acl.auth.php
|
# acl.auth.php
|
||||||
# <?php exit()?>
|
# <?php exit()?>
|
||||||
|
@ -257,10 +251,7 @@ in
|
||||||
options = {
|
options = {
|
||||||
services.dokuwiki = mkOption {
|
services.dokuwiki = mkOption {
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
# Used to support old interface
|
|
||||||
freeformType = types.attrsOf (types.submodule siteOpts);
|
|
||||||
|
|
||||||
# New interface
|
|
||||||
options.sites = mkOption {
|
options.sites = mkOption {
|
||||||
type = types.attrsOf (types.submodule siteOpts);
|
type = types.attrsOf (types.submodule siteOpts);
|
||||||
default = {};
|
default = {};
|
||||||
|
@ -301,8 +292,6 @@ in
|
||||||
}
|
}
|
||||||
]) eachSite);
|
]) eachSite);
|
||||||
|
|
||||||
warnings = mapAttrsToList (hostName: _: ''services.dokuwiki."${hostName}" is deprecated use services.dokuwiki.sites."${hostName}"'') (oldSites cfg);
|
|
||||||
|
|
||||||
services.phpfpm.pools = mapAttrs' (hostName: cfg: (
|
services.phpfpm.pools = mapAttrs' (hostName: cfg: (
|
||||||
nameValuePair "dokuwiki-${hostName}" {
|
nameValuePair "dokuwiki-${hostName}" {
|
||||||
inherit user;
|
inherit user;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue