diff options
author | Jonas Heinrich <onny@project-insanity.org> | 2022-01-15 18:38:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-16 02:38:20 +0900 |
commit | 75d417c267b51c51587ec67af71b8a98ca358123 (patch) | |
tree | dc2eee3157a0fd32a578c183fb2efbffa80920ce /nixos/modules/services/web-apps | |
parent | 60dec7aa319dc620cd77ecae8ce48f5374450452 (diff) | |
download | nixlib-75d417c267b51c51587ec67af71b8a98ca358123.tar nixlib-75d417c267b51c51587ec67af71b8a98ca358123.tar.gz nixlib-75d417c267b51c51587ec67af71b8a98ca358123.tar.bz2 nixlib-75d417c267b51c51587ec67af71b8a98ca358123.tar.lz nixlib-75d417c267b51c51587ec67af71b8a98ca358123.tar.xz nixlib-75d417c267b51c51587ec67af71b8a98ca358123.tar.zst nixlib-75d417c267b51c51587ec67af71b8a98ca358123.zip |
nixos/dokuwiki: Drop deprecated old interface (#152676)
Diffstat (limited to 'nixos/modules/services/web-apps')
-rw-r--r-- | nixos/modules/services/web-apps/dokuwiki.nix | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/nixos/modules/services/web-apps/dokuwiki.nix b/nixos/modules/services/web-apps/dokuwiki.nix index 9b9ae931f9a7..392748a93e0a 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; |