Loading nixos/modules/services/web-apps/dokuwiki.nix +17 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ let pkg = hostName: cfg: cfg.package.combine { inherit (cfg) plugins templates; inherit (cfg) plugins templates extraConfigs; pname = p: "${p.pname}-${hostName}"; Loading Loading @@ -345,6 +345,22 @@ let ''; }; extraConfigs = mkOption { type = types.attrsOf types.path; default = { }; description = '' Path(s) to additional configuration files that are then linked to the 'conf' directory. ''; example = literalExpression '' { "acronyms.local.conf" = pkgs.writeText "acronyms.local.conf" ''' r13y reproducibility '''; "entities.local.conf" = ./dokuwiki-entities; } ''; }; poolConfig = mkOption { type = with types; Loading nixos/tests/dokuwiki.nix +3 −7 Original line number Diff line number Diff line Loading @@ -30,12 +30,6 @@ let r13y reproducibility ''; dwWithAcronyms = pkgs.dokuwiki.overrideAttrs (prev: { installPhase = prev.installPhase or "" + '' ln -sf ${acronymsFile} $out/share/dokuwiki/conf/acronyms.local.conf ''; }); mkNode = webserver: { ... }: Loading @@ -53,9 +47,11 @@ let }; }; "site2.local" = { package = dwWithAcronyms; usersFile = "/var/lib/dokuwiki/site2.local/users.auth.php"; plugins = [ plugin-icalevents ]; extraConfigs = { "acronyms.local.conf" = acronymsFile; }; settings = { useacl = true; superuser = "admin"; Loading pkgs/by-name/do/dokuwiki/package.nix +10 −2 Original line number Diff line number Diff line Loading @@ -65,6 +65,7 @@ stdenv.mkDerivation rec { localConfig ? null, pluginsConfig ? null, aclConfig ? null, extraConfigs ? { }, pname ? (p: "${p.pname}-combined"), }: let Loading @@ -76,6 +77,12 @@ stdenv.mkDerivation rec { "" ] ); configs = { "local.php" = localConfig; "plugins.local.php" = pluginsConfig; } // extraConfigs; in basePackage.overrideAttrs (prev: { pname = if builtins.isFunction pname then pname prev else pname; Loading @@ -87,8 +94,9 @@ stdenv.mkDerivation rec { ${lib.concatMapStringsSep "\n" ( plugin: "cp -r ${toString plugin} $out/share/dokuwiki/lib/plugins/${plugin.name}" ) plugins} ${isNotEmpty localConfig "ln -sf ${localConfig} $out/share/dokuwiki/conf/local.php"} ${isNotEmpty pluginsConfig "ln -sf ${pluginsConfig} $out/share/dokuwiki/conf/plugins.local.php"} ${lib.concatMapAttrsStringSep "\n" ( name: path: "${isNotEmpty path "ln -sf ${path} $out/share/dokuwiki/conf/${name}"}" ) configs} ${isNotEmpty aclConfig "ln -sf ${aclConfig} $out/share/dokuwiki/acl.auth.php"} ''; }); Loading Loading
nixos/modules/services/web-apps/dokuwiki.nix +17 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ let pkg = hostName: cfg: cfg.package.combine { inherit (cfg) plugins templates; inherit (cfg) plugins templates extraConfigs; pname = p: "${p.pname}-${hostName}"; Loading Loading @@ -345,6 +345,22 @@ let ''; }; extraConfigs = mkOption { type = types.attrsOf types.path; default = { }; description = '' Path(s) to additional configuration files that are then linked to the 'conf' directory. ''; example = literalExpression '' { "acronyms.local.conf" = pkgs.writeText "acronyms.local.conf" ''' r13y reproducibility '''; "entities.local.conf" = ./dokuwiki-entities; } ''; }; poolConfig = mkOption { type = with types; Loading
nixos/tests/dokuwiki.nix +3 −7 Original line number Diff line number Diff line Loading @@ -30,12 +30,6 @@ let r13y reproducibility ''; dwWithAcronyms = pkgs.dokuwiki.overrideAttrs (prev: { installPhase = prev.installPhase or "" + '' ln -sf ${acronymsFile} $out/share/dokuwiki/conf/acronyms.local.conf ''; }); mkNode = webserver: { ... }: Loading @@ -53,9 +47,11 @@ let }; }; "site2.local" = { package = dwWithAcronyms; usersFile = "/var/lib/dokuwiki/site2.local/users.auth.php"; plugins = [ plugin-icalevents ]; extraConfigs = { "acronyms.local.conf" = acronymsFile; }; settings = { useacl = true; superuser = "admin"; Loading
pkgs/by-name/do/dokuwiki/package.nix +10 −2 Original line number Diff line number Diff line Loading @@ -65,6 +65,7 @@ stdenv.mkDerivation rec { localConfig ? null, pluginsConfig ? null, aclConfig ? null, extraConfigs ? { }, pname ? (p: "${p.pname}-combined"), }: let Loading @@ -76,6 +77,12 @@ stdenv.mkDerivation rec { "" ] ); configs = { "local.php" = localConfig; "plugins.local.php" = pluginsConfig; } // extraConfigs; in basePackage.overrideAttrs (prev: { pname = if builtins.isFunction pname then pname prev else pname; Loading @@ -87,8 +94,9 @@ stdenv.mkDerivation rec { ${lib.concatMapStringsSep "\n" ( plugin: "cp -r ${toString plugin} $out/share/dokuwiki/lib/plugins/${plugin.name}" ) plugins} ${isNotEmpty localConfig "ln -sf ${localConfig} $out/share/dokuwiki/conf/local.php"} ${isNotEmpty pluginsConfig "ln -sf ${pluginsConfig} $out/share/dokuwiki/conf/plugins.local.php"} ${lib.concatMapAttrsStringSep "\n" ( name: path: "${isNotEmpty path "ln -sf ${path} $out/share/dokuwiki/conf/${name}"}" ) configs} ${isNotEmpty aclConfig "ln -sf ${aclConfig} $out/share/dokuwiki/acl.auth.php"} ''; }); Loading