···328 </listitem>
329 <listitem>
330 <para>
00000000000000331 To reduce closure size in
332 <literal>nixos/modules/profiles/minimal.nix</literal> profile
333 disabled installation documentations and manuals. Also
···328 </listitem>
329 <listitem>
330 <para>
331+ The <literal>dokuwiki</literal> service now takes
332+ configuration via the
333+ <literal>services.dokuwiki.sites.<name>.settings</literal>
334+ attribute set, <literal>extraConfig</literal> is deprecated
335+ and will be removed. The
336+ <literal>{aclUse,superUser,disableActions}</literal>
337+ attributes have been renamed, <literal>pluginsConfig</literal>
338+ now also accepts an attribute set of booleans, passing plain
339+ PHP is deprecated. Same applies to <literal>acl</literal>
340+ which now also accepts structured settings.
341+ </para>
342+ </listitem>
343+ <listitem>
344+ <para>
345 To reduce closure size in
346 <literal>nixos/modules/profiles/minimal.nix</literal> profile
347 disabled installation documentations and manuals. Also
+4
nixos/doc/manual/release-notes/rl-2305.section.md
···88 `services.dnsmasq.extraConfig` will be deprecated when NixOS 22.11 reaches
89 end of life.
90000091- To reduce closure size in `nixos/modules/profiles/minimal.nix` profile disabled installation documentations and manuals. Also disabled `logrotate` and `udisks2` services.
9293- The minimal ISO image now uses the `nixos/modules/profiles/minimal.nix` profile.
···88 `services.dnsmasq.extraConfig` will be deprecated when NixOS 22.11 reaches
89 end of life.
9091+- The `dokuwiki` service now takes configuration via the `services.dokuwiki.sites.<name>.settings` attribute set, `extraConfig` is deprecated and will be removed.
92+ The `{aclUse,superUser,disableActions}` attributes have been renamed, `pluginsConfig` now also accepts an attribute set of booleans, passing plain PHP is deprecated.
93+ Same applies to `acl` which now also accepts structured settings.
94+95- To reduce closure size in `nixos/modules/profiles/minimal.nix` profile disabled installation documentations and manuals. Also disabled `logrotate` and `udisks2` services.
9697- The minimal ISO image now uses the `nixos/modules/profiles/minimal.nix` profile.
+252-95
nixos/modules/services/web-apps/dokuwiki.nix
···8 user = "dokuwiki";
9 webserver = config.services.${cfg.webserver};
1011- dokuwikiAclAuthConfig = hostName: cfg: pkgs.writeText "acl.auth-${hostName}.php" ''
000000000012 # acl.auth.php
13 # <?php exit()?>
14 #
15 # Access Control Lists
16 #
17- ${toString cfg.acl}
18 '';
1920- dokuwikiLocalConfig = hostName: cfg: pkgs.writeText "local-${hostName}.php" ''
21- <?php
22- $conf['savedir'] = '${cfg.stateDir}';
23- $conf['superuser'] = '${toString cfg.superUser}';
24- $conf['useacl'] = '${toString cfg.aclUse}';
25- $conf['disableactions'] = '${cfg.disableActions}';
00000000000000000000000000000026 ${toString cfg.extraConfig}
27 '';
2829- dokuwikiPluginsLocalConfig = hostName: cfg: pkgs.writeText "plugins.local-${hostName}.php" ''
30- <?php
31- ${cfg.pluginsConfig}
0032 '';
33-3435 pkg = hostName: cfg: pkgs.stdenv.mkDerivation rec {
36 pname = "dokuwiki-${hostName}";
···42 cp -r * $out/
4344 # symlink the dokuwiki config
45- ln -s ${dokuwikiLocalConfig hostName cfg} $out/share/dokuwiki/local.php
4647 # symlink plugins config
48- ln -s ${dokuwikiPluginsLocalConfig hostName cfg} $out/share/dokuwiki/plugins.local.php
4950- # symlink acl
51- ln -s ${dokuwikiAclAuthConfig hostName cfg} $out/share/dokuwiki/acl.auth.php
5253 # symlink additional plugin(s) and templates(s)
54- ${concatMapStringsSep "\n" (template: "ln -s ${template} $out/share/dokuwiki/lib/tpl/${template.name}") cfg.templates}
55- ${concatMapStringsSep "\n" (plugin: "ln -s ${plugin} $out/share/dokuwiki/lib/plugins/${plugin.name}") cfg.plugins}
56 '';
57 };
58000000000000000000000000000000000000059 siteOpts = { config, lib, name, ... }:
60 {
0000000000000000000000061 options = {
62 enable = mkEnableOption (lib.mdDoc "DokuWiki web application.");
63···75 };
7677 acl = mkOption {
78- type = types.nullOr types.lines;
79 default = null;
80- example = "* @ALL 8";
000000000000081 description = lib.mdDoc ''
82 Access Control Lists: see <https://www.dokuwiki.org/acl>
83 Mutually exclusive with services.dokuwiki.aclFile
···9091 aclFile = mkOption {
92 type = with types; nullOr str;
93- default = if (config.aclUse && config.acl == null) then "/var/lib/dokuwiki/${name}/acl.auth.php" else null;
94 description = lib.mdDoc ''
95 Location of the dokuwiki acl rules. Mutually exclusive with services.dokuwiki.acl
96 Mutually exclusive with services.dokuwiki.acl which is preferred.
···100 example = "/var/lib/dokuwiki/${name}/acl.auth.php";
101 };
102103- aclUse = mkOption {
104- type = types.bool;
105- default = true;
106- description = lib.mdDoc ''
107- Necessary for users to log in into the system.
108- Also limits anonymous users. When disabled,
109- everyone is able to create and edit content.
110- '';
111- };
112-113 pluginsConfig = mkOption {
114- type = types.lines;
115- default = ''
116- $plugins['authad'] = 0;
117- $plugins['authldap'] = 0;
118- $plugins['authmysql'] = 0;
119- $plugins['authpgsql'] = 0;
120- '';
121 description = lib.mdDoc ''
122 List of the dokuwiki (un)loaded plugins.
123 '';
124 };
125126- superUser = mkOption {
127- type = types.nullOr types.str;
128- default = "@admin";
129- description = lib.mdDoc ''
130- You can set either a username, a list of usernames (“admin1,admin2”),
131- or the name of a group by prepending an @ char to the groupname
132- Consult documentation <https://www.dokuwiki.org/config:superuser> for further instructions.
133- '';
134- };
135-136 usersFile = mkOption {
137 type = with types; nullOr str;
138- default = if config.aclUse then "/var/lib/dokuwiki/${name}/users.auth.php" else null;
139 description = lib.mdDoc ''
140 Location of the dokuwiki users file. List of users. Format:
141···150 example = "/var/lib/dokuwiki/${name}/users.auth.php";
151 };
152153- disableActions = mkOption {
154- type = types.nullOr types.str;
155- default = "";
156- example = "search,register";
157- description = lib.mdDoc ''
158- Disable individual action modes. Refer to
159- <https://www.dokuwiki.org/config:action_modes>
160- for details on supported values.
161- '';
162- };
163-164 plugins = mkOption {
165 type = types.listOf types.path;
166 default = [];
···173 '';
174 example = literalExpression ''
175 let
176- # Let's package the icalevents plugin
177- plugin-icalevents = pkgs.stdenv.mkDerivation {
178 name = "icalevents";
179- # Download the plugin from the dokuwiki site
180- src = pkgs.fetchurl {
181- url = "https://github.com/real-or-random/dokuwiki-plugin-icalevents/releases/download/2017-06-16/dokuwiki-plugin-icalevents-2017-06-16.zip";
182- sha256 = "e40ed7dd6bbe7fe3363bbbecb4de481d5e42385b5a0f62f6a6ce6bf3a1f9dfa8";
0183 };
184- sourceRoot = ".";
185- # We need unzip to build this package
186- buildInputs = [ pkgs.unzip ];
187- # Installing simply means copying all files to the output directory
188 installPhase = "mkdir -p $out; cp -R * $out/";
189 };
190 # And then pass this theme to the plugin list like this:
···204 '';
205 example = literalExpression ''
206 let
207- # Let's package the bootstrap3 theme
208- template-bootstrap3 = pkgs.stdenv.mkDerivation {
209- name = "bootstrap3";
210- # Download the theme from the dokuwiki site
211- src = pkgs.fetchurl {
212- url = "https://github.com/giterlizzi/dokuwiki-template-bootstrap3/archive/v2019-05-22.zip";
213- sha256 = "4de5ff31d54dd61bbccaf092c9e74c1af3a4c53e07aa59f60457a8f00cfb23a6";
214- };
215- # We need unzip to build this package
216- buildInputs = [ pkgs.unzip ];
217- # Installing simply means copying all files to the output directory
218- installPhase = "mkdir -p $out; cp -R * $out/";
219 };
00220 # And then pass this theme to the template list like this:
221 in [ template-bootstrap3 ]
222 '';
···238 '';
239 };
2400000000000000000000000000000000000000000000000000000000000000000000241 extraConfig = mkOption {
000242 type = types.nullOr types.lines;
243 default = null;
244 example = ''
···249 DokuWiki configuration. Refer to
250 <https://www.dokuwiki.org/config>
251 for details on supported values.
000252 '';
253 };
25400000000255 };
256257 };
0258in
259{
260- # interface
261 options = {
262 services.dokuwiki = {
263···276 Further nginx configuration can be done by adapting `services.nginx.virtualHosts.<name>`.
277 See [](#opt-services.nginx.virtualHosts) for further information.
278279- Further apache2 configuration can be done by adapting `services.httpd.virtualHosts.<name>`.
280- See [](#opt-services.httpd.virtualHosts) for further information.
281 '';
282 };
283···287 # implementation
288 config = mkIf (eachSite != {}) (mkMerge [{
28900290 assertions = flatten (mapAttrsToList (hostName: cfg:
291 [{
292- assertion = cfg.aclUse -> (cfg.acl != null || cfg.aclFile != null);
293- message = "Either services.dokuwiki.sites.${hostName}.acl or services.dokuwiki.sites.${hostName}.aclFile is mandatory if aclUse true";
294 }
295 {
296- assertion = cfg.usersFile != null -> cfg.aclUse != false;
297- message = "services.dokuwiki.sites.${hostName}.aclUse must must be true if usersFile is not null";
298 }
299 ]) eachSite);
300···303 inherit user;
304 group = webserver.group;
305306- phpPackage = pkgs.php81;
307- phpEnv = {
308- DOKUWIKI_LOCAL_CONFIG = "${dokuwikiLocalConfig hostName cfg}";
309- DOKUWIKI_PLUGINS_LOCAL_CONFIG = "${dokuwikiPluginsLocalConfig hostName cfg}";
310- } // optionalAttrs (cfg.usersFile != null) {
311 DOKUWIKI_USERS_AUTH_CONFIG = "${cfg.usersFile}";
312- } //optionalAttrs (cfg.aclUse) {
313 DOKUWIKI_ACL_AUTH_CONFIG = if (cfg.acl != null) then "${dokuwikiAclAuthConfig hostName cfg}" else "${toString cfg.aclFile}";
314 };
315
···8 user = "dokuwiki";
9 webserver = config.services.${cfg.webserver};
1011+ mkPhpIni = generators.toKeyValue {
12+ mkKeyValue = generators.mkKeyValueDefault {} " = ";
13+ };
14+ mkPhpPackage = cfg: cfg.phpPackage.buildEnv {
15+ extraConfig = mkPhpIni cfg.phpOptions;
16+ };
17+18+ dokuwikiAclAuthConfig = hostName: cfg: let
19+ inherit (cfg) acl;
20+ acl_gen = concatMapStringsSep "\n" (l: "${l.page} \t ${l.actor} \t ${toString l.level}");
21+ in pkgs.writeText "acl.auth-${hostName}.php" ''
22 # acl.auth.php
23 # <?php exit()?>
24 #
25 # Access Control Lists
26 #
27+ ${if isString acl then acl else acl_gen acl}
28 '';
2930+ mergeConfig = cfg: {
31+ useacl = false; # Dokuwiki default
32+ savedir = cfg.stateDir;
33+ } // cfg.settings;
34+35+ writePhpFile = name: text: pkgs.writeTextFile {
36+ inherit name;
37+ text = "<?php\n${text}";
38+ checkPhase = "${pkgs.php81}/bin/php --syntax-check $target";
39+ };
40+41+ mkPhpValue = v: let
42+ isHasAttr = s: isAttrs v && hasAttr s v;
43+ in
44+ if isString v then escapeShellArg v
45+ # NOTE: If any value contains a , (comma) this will not get escaped
46+ else if isList v && any lib.strings.isCoercibleToString v then escapeShellArg (concatMapStringsSep "," toString v)
47+ else if isInt v then toString v
48+ else if isBool v then toString (if v then 1 else 0)
49+ else if isHasAttr "_file" then "trim(file_get_contents(${lib.escapeShellArg v._file}))"
50+ else if isHasAttr "_raw" then v._raw
51+ else abort "The dokuwiki localConf value ${lib.generators.toPretty {} v} can not be encoded."
52+ ;
53+54+ mkPhpAttrVals = v: flatten (mapAttrsToList mkPhpKeyVal v);
55+ mkPhpKeyVal = k: v: let
56+ values = if (isAttrs v && (hasAttr "_file" v || hasAttr "_raw" v )) || !isAttrs v then
57+ [" = ${mkPhpValue v};"]
58+ else
59+ mkPhpAttrVals v;
60+ in map (e: "[${escapeShellArg k}]${e}") (flatten values);
61+62+ dokuwikiLocalConfig = hostName: cfg: let
63+ conf_gen = c: map (v: "$conf${v}") (mkPhpAttrVals c);
64+ in writePhpFile "local-${hostName}.php" ''
65+ ${concatStringsSep "\n" (conf_gen cfg.mergedConfig)}
66 ${toString cfg.extraConfig}
67 '';
6869+ dokuwikiPluginsLocalConfig = hostName: cfg: let
70+ pc = cfg.pluginsConfig;
71+ pc_gen = pc: concatStringsSep "\n" (mapAttrsToList (n: v: "$plugins['${n}'] = ${boolToString v};") pc);
72+ in writePhpFile "plugins.local-${hostName}.php" ''
73+ ${if isString pc then pc else pc_gen pc}
74 '';
07576 pkg = hostName: cfg: pkgs.stdenv.mkDerivation rec {
77 pname = "dokuwiki-${hostName}";
···83 cp -r * $out/
8485 # symlink the dokuwiki config
86+ ln -sf ${dokuwikiLocalConfig hostName cfg} $out/share/dokuwiki/conf/local.php
8788 # symlink plugins config
89+ ln -sf ${dokuwikiPluginsLocalConfig hostName cfg} $out/share/dokuwiki/conf/plugins.local.php
9091+ # symlink acl (if needed)
92+ ${optionalString (cfg.mergedConfig.useacl && cfg.acl != null) "ln -sf ${dokuwikiAclAuthConfig hostName cfg} $out/share/dokuwiki/acl.auth.php"}
9394 # symlink additional plugin(s) and templates(s)
95+ ${concatMapStringsSep "\n" (template: "ln -sf ${template} $out/share/dokuwiki/lib/tpl/${template.name}") cfg.templates}
96+ ${concatMapStringsSep "\n" (plugin: "ln -sf ${plugin} $out/share/dokuwiki/lib/plugins/${plugin.name}") cfg.plugins}
97 '';
98 };
99100+ aclOpts = { ... }: {
101+ options = {
102+103+ page = mkOption {
104+ type = types.str;
105+ description = "Page or namespace to restrict";
106+ example = "start";
107+ };
108+109+ actor = mkOption {
110+ type = types.str;
111+ description = "User or group to restrict";
112+ example = "@external";
113+ };
114+115+ level = let
116+ available = {
117+ "none" = 0;
118+ "read" = 1;
119+ "edit" = 2;
120+ "create" = 4;
121+ "upload" = 8;
122+ "delete" = 16;
123+ };
124+ in mkOption {
125+ type = types.enum ((attrValues available) ++ (attrNames available));
126+ apply = x: if isInt x then x else available.${x};
127+ description = ''
128+ Permission level to restrict the actor(s) to.
129+ See <https://www.dokuwiki.org/acl#background_info> for explanation
130+ '';
131+ example = "read";
132+ };
133+134+ };
135+ };
136+137 siteOpts = { config, lib, name, ... }:
138 {
139+ imports = [
140+ # NOTE: These will sadly not print the absolute argument path but only the name. Related to #96006
141+ (mkRenamedOptionModule [ "aclUse" ] [ "settings" "useacl" ] )
142+ (mkRenamedOptionModule [ "superUser" ] [ "settings" "superuser" ] )
143+ (mkRenamedOptionModule [ "disableActions" ] [ "settings" "disableactions" ] )
144+ ({ config, options, name, ...}: {
145+ config.warnings =
146+ (optional (isString config.pluginsConfig) ''
147+ Passing plain strings to services.dokuwiki.sites.${name}.pluginsConfig has been deprecated and will not be continue to be supported in the future.
148+ Please pass structured settings instead.
149+ '')
150+ ++ (optional (isString config.acl) ''
151+ Passing a plain string to services.dokuwiki.sites.${name}.acl has been deprecated and will not continue to be supported in the future.
152+ Please pass structured settings instead.
153+ '')
154+ ++ (optional (config.extraConfig != null) ''
155+ services.dokuwiki.sites.${name}.extraConfig is deprecated and will be removed in the future.
156+ Please pass structured settings to services.dokuwiki.sites.${name}.settings instead.
157+ '')
158+ ;
159+ })
160+ ];
161+162 options = {
163 enable = mkEnableOption (lib.mdDoc "DokuWiki web application.");
164···176 };
177178 acl = mkOption {
179+ type = with types; nullOr (oneOf [ lines (listOf (submodule aclOpts)) ]);
180 default = null;
181+ example = literalExpression ''
182+ [
183+ {
184+ page = "start";
185+ actor = "@external";
186+ level = "read";
187+ }
188+ {
189+ page = "*";
190+ actor = "@users";
191+ level = "upload";
192+ }
193+ ]
194+ '';
195 description = lib.mdDoc ''
196 Access Control Lists: see <https://www.dokuwiki.org/acl>
197 Mutually exclusive with services.dokuwiki.aclFile
···204205 aclFile = mkOption {
206 type = with types; nullOr str;
207+ default = if (config.mergedConfig.useacl && config.acl == null) then "/var/lib/dokuwiki/${name}/acl.auth.php" else null;
208 description = lib.mdDoc ''
209 Location of the dokuwiki acl rules. Mutually exclusive with services.dokuwiki.acl
210 Mutually exclusive with services.dokuwiki.acl which is preferred.
···214 example = "/var/lib/dokuwiki/${name}/acl.auth.php";
215 };
2160000000000217 pluginsConfig = mkOption {
218+ type = with types; oneOf [lines (attrsOf bool)];
219+ default = {
220+ authad = false;
221+ authldap = false;
222+ authmysql = false;
223+ authpgsql = false;
224+ };
225 description = lib.mdDoc ''
226 List of the dokuwiki (un)loaded plugins.
227 '';
228 };
2290000000000230 usersFile = mkOption {
231 type = with types; nullOr str;
232+ default = if config.mergedConfig.useacl then "/var/lib/dokuwiki/${name}/users.auth.php" else null;
233 description = lib.mdDoc ''
234 Location of the dokuwiki users file. List of users. Format:
235···244 example = "/var/lib/dokuwiki/${name}/users.auth.php";
245 };
24600000000000247 plugins = mkOption {
248 type = types.listOf types.path;
249 default = [];
···256 '';
257 example = literalExpression ''
258 let
259+ plugin-icalevents = pkgs.stdenv.mkDerivation rec {
0260 name = "icalevents";
261+ version = "2017-06-16";
262+ src = pkgs.fetchzip {
263+ stripRoot = false;
264+ url = "https://github.com/real-or-random/dokuwiki-plugin-icalevents/releases/download/''${version}/dokuwiki-plugin-icalevents-''${version}.zip";
265+ hash = "sha256-IPs4+qgEfe8AAWevbcCM9PnyI0uoyamtWeg4rEb+9Wc=";
266 };
0000267 installPhase = "mkdir -p $out; cp -R * $out/";
268 };
269 # And then pass this theme to the plugin list like this:
···283 '';
284 example = literalExpression ''
285 let
286+ template-bootstrap3 = pkgs.stdenv.mkDerivation rec {
287+ name = "bootstrap3";
288+ version = "2022-07-27";
289+ src = pkgs.fetchFromGitHub {
290+ owner = "giterlizzi";
291+ repo = "dokuwiki-template-bootstrap3";
292+ rev = "v''${version}";
293+ hash = "sha256-B3Yd4lxdwqfCnfmZdp+i/Mzwn/aEuZ0ovagDxuR6lxo=";
0000294 };
295+ installPhase = "mkdir -p $out; cp -R * $out/";
296+ };
297 # And then pass this theme to the template list like this:
298 in [ template-bootstrap3 ]
299 '';
···315 '';
316 };
317318+ phpPackage = mkOption {
319+ type = types.package;
320+ relatedPackages = [ "php80" "php81" ];
321+ default = pkgs.php81;
322+ defaultText = "pkgs.php81";
323+ description = lib.mdDoc ''
324+ PHP package to use for this dokuwiki site.
325+ '';
326+ };
327+328+ phpOptions = mkOption {
329+ type = types.attrsOf types.str;
330+ default = {};
331+ description = lib.mdDoc ''
332+ Options for PHP's php.ini file for this dokuwiki site.
333+ '';
334+ example = literalExpression ''
335+ {
336+ "opcache.interned_strings_buffer" = "8";
337+ "opcache.max_accelerated_files" = "10000";
338+ "opcache.memory_consumption" = "128";
339+ "opcache.revalidate_freq" = "15";
340+ "opcache.fast_shutdown" = "1";
341+ }
342+ '';
343+ };
344+345+ settings = mkOption {
346+ type = types.attrsOf types.anything;
347+ default = {
348+ useacl = true;
349+ superuser = "admin";
350+ };
351+ description = lib.mdDoc ''
352+ Structural DokuWiki configuration.
353+ Refer to <https://www.dokuwiki.org/config>
354+ for details and supported values.
355+ Settings can either be directly set from nix,
356+ loaded from a file using `._file` or obtained from any
357+ PHP function calls using `._raw`.
358+ '';
359+ example = literalExpression ''
360+ {
361+ title = "My Wiki";
362+ userewrite = 1;
363+ disableactions = [ "register" ]; # Will be concatenated with commas
364+ plugin.smtp = {
365+ smtp_pass._file = "/var/run/secrets/dokuwiki/smtp_pass";
366+ smtp_user._raw = "getenv('DOKUWIKI_SMTP_USER')";
367+ };
368+ }
369+ '';
370+ };
371+372+ mergedConfig = mkOption {
373+ readOnly = true;
374+ default = mergeConfig config;
375+ defaultText = literalExpression ''
376+ {
377+ useacl = true;
378+ }
379+ '';
380+ description = lib.mdDoc ''
381+ Read only representation of the final configuration.
382+ '';
383+ };
384+385 extraConfig = mkOption {
386+ # This Option is deprecated and only kept until sometime before 23.05 for compatibility reasons
387+ # FIXME (@e1mo): Actually remember removing this before 23.05.
388+ visible = false;
389 type = types.nullOr types.lines;
390 default = null;
391 example = ''
···396 DokuWiki configuration. Refer to
397 <https://www.dokuwiki.org/config>
398 for details on supported values.
399+400+ **Note**: Please pass Structured settings via
401+ `services.dokuwiki.sites.${name}.settings` instead.
402 '';
403 };
404405+ # Required for the mkRenamedOptionModule
406+ # TODO: Remove me once https://github.com/NixOS/nixpkgs/issues/96006 is fixed
407+ # or the aclUse, ... options are removed.
408+ warnings = mkOption {
409+ type = types.listOf types.unspecified;
410+ default = [ ];
411+ visible = false;
412+ internal = true;
413 };
414415 };
416+ };
417in
418{
0419 options = {
420 services.dokuwiki = {
421···434 Further nginx configuration can be done by adapting `services.nginx.virtualHosts.<name>`.
435 See [](#opt-services.nginx.virtualHosts) for further information.
436437+ Further caddy configuration can be done by adapting `services.caddy.virtualHosts.<name>`.
438+ See [](#opt-services.caddy.virtualHosts) for further information.
439 '';
440 };
441···445 # implementation
446 config = mkIf (eachSite != {}) (mkMerge [{
447448+ warnings = flatten (mapAttrsToList (_: cfg: cfg.warnings) eachSite);
449+450 assertions = flatten (mapAttrsToList (hostName: cfg:
451 [{
452+ assertion = cfg.mergedConfig.useacl -> (cfg.acl != null || cfg.aclFile != null);
453+ message = "Either services.dokuwiki.sites.${hostName}.acl or services.dokuwiki.sites.${hostName}.aclFile is mandatory if settings.useacl is true";
454 }
455 {
456+ assertion = cfg.usersFile != null -> cfg.mergedConfig.useacl != false;
457+ message = "services.dokuwiki.sites.${hostName}.settings.useacl must must be true if usersFile is not null";
458 }
459 ]) eachSite);
460···463 inherit user;
464 group = webserver.group;
465466+ phpPackage = mkPhpPackage cfg;
467+ phpEnv = optionalAttrs (cfg.usersFile != null) {
000468 DOKUWIKI_USERS_AUTH_CONFIG = "${cfg.usersFile}";
469+ } // optionalAttrs (cfg.mergedConfig.useacl) {
470 DOKUWIKI_ACL_AUTH_CONFIG = if (cfg.acl != null) then "${dokuwikiAclAuthConfig hostName cfg}" else "${toString cfg.aclFile}";
471 };
472
···1diff --git a/SConstruct b/SConstruct
2-index 32cb644..0b3a208 100644
3--- a/SConstruct
4+++ b/SConstruct
5-@@ -225,6 +225,11 @@ if env['PLATFORM'] == 'posix':
0000000006 ["asound", "alsa/asoundlib.h"],
7 ["openal", "AL/al.h"]]
8-9+env.Append(ENV={'PATH': ' ' + os.environ['PATH'], })
10+env.Append(LIBPATH=ARGUMENTS.get('LIBPATH', '').split(':'))
11+env.Append(CCFLAGS=' ' + os.environ.get('NIX_CFLAGS_COMPILE',''))
···13+
14 ################################################################################
15 # Make sure we have these libraries availible
16-00000000000000000000000000000000000000000000000000000000000000000000000
···1diff --git a/SConstruct b/SConstruct
2+index 32cb644..650333a 100644
3--- a/SConstruct
4+++ b/SConstruct
5+@@ -6,7 +6,7 @@
6+ # application, then calls the sconscripts for libfluxus and
7+ # the fluxus Racket modules
8+9+-import os, os.path, sys, commands, subprocess
10++import os, os.path, sys, subprocess
11+12+ MajorVersion = "0"
13+ MinorVersion = "19"
14+@@ -225,13 +225,18 @@ if env['PLATFORM'] == 'posix':
15 ["asound", "alsa/asoundlib.h"],
16 ["openal", "AL/al.h"]]
17+18+env.Append(ENV={'PATH': ' ' + os.environ['PATH'], })
19+env.Append(LIBPATH=ARGUMENTS.get('LIBPATH', '').split(':'))
20+env.Append(CCFLAGS=' ' + os.environ.get('NIX_CFLAGS_COMPILE',''))
···22+
23 ################################################################################
24 # Make sure we have these libraries availible
25+26+ if not GetOption('clean'):
27+- print '--------------------------------------------------------'
28+- print 'Fluxus: Configuring Build Environment'
29+- print '--------------------------------------------------------'
30++ print('--------------------------------------------------------')
31++ print('Fluxus: Configuring Build Environment')
32++ print('--------------------------------------------------------')
33+ # detect ode precision
34+ if not GetOption('clean'):
35+ try:
36+@@ -240,27 +245,27 @@ if not GetOption('clean'):
37+ if isinstance(ode_str[0], str):
38+ env.MergeFlags(ode_str[0])
39+ except:
40+- print 'WARNING: unable to run ode-config, cannot detect ODE precision'
41++ print('WARNING: unable to run ode-config, cannot detect ODE precision')
42+43+ conf = Configure(env)
44+45+ # check Racket and OpenAL frameworks on osx
46+ if env['PLATFORM'] == 'darwin':
47+ if not conf.CheckHeader('scheme.h'):
48+- print "ERROR: 'racket3m' must be installed!"
49++ print("ERROR: 'racket3m' must be installed!")
50+ Exit(1)
51+ if racket_framework:
52+ LibList = filter(lambda x: x[0] != 'racket3m', LibList)
53+ # OpenAL should be installed everywhere
54+ if not conf.CheckHeader('OpenAL/al.h'):
55+- print "ERROR: 'OpenAL' must be installed!"
56++ print("ERROR: 'OpenAL' must be installed!")
57+ Exit(1)
58+59+ # all libraries are required, and some of them require each other,
60+ # hence the order is important, and autoadd=1
61+ for (lib,headers) in LibList:
62+ if not conf.CheckLibWithHeader(lib, headers, 'C', autoadd = 1):
63+- print "ERROR: '%s' must be installed!" % (lib)
64++ print("ERROR: '%s' must be installed!" % (lib))
65+ Exit(1)
66+67+ if not conf.CheckFunc("dInitODE2"):
68+@@ -334,7 +339,7 @@ if not GetOption('clean'):
69+ ])
70+71+ if raco_status != 0:
72+- print "ERROR: Failed to run command 'raco'"
73++ print("ERROR: Failed to run command 'raco'")
74+ Exit(1)
75+76+77+@@ -377,8 +382,8 @@ if not GetOption('clean') and static_modules:
78+79+ app_env['LIBS'].remove("pthread")
80+ app_env['LIBS'].remove("dl")
81+- app_env['LIBS'].remove("ode")
82+- app_env['LIBS'].remove("sndfile")
83++ app_env['LIBS'].remove("ode")
84++ app_env['LIBS'].remove("sndfile")
85+86+ # now go through the rest of the libs, removing them from
87+ # the environment at the same time
88+@@ -425,7 +430,7 @@ SConscript(dirs = build_dirs,
89+ if not GetOption('clean'):
90+ helpmap_status = subprocess.call(["racket", "makehelpmap.scm"], cwd="docs/helpmap")
91+ if helpmap_status != 0:
92+- print "ERROR: Failed to build 'docs/helpmap'"
93++ print("ERROR: Failed to build 'docs/helpmap'")
94+ Exit(1)
95+96+ ################################################################################
···2829 nativeBuildInputs = [ meson ninja pkg-config ];
300031 meta = with lib; {
32 homepage = "https://github.com/Samsung/rlottie";
33 description = "A platform independent standalone c++ library for rendering vector based animations and art in realtime";
34 license = with licenses; [ mit bsd3 mpl11 ftl ];
35 platforms = platforms.all;
36 maintainers = with maintainers; [ CRTified ];
37- # never built on aarch64-darwin since first introduction in nixpkgs
38- broken = stdenv.isDarwin && stdenv.isAarch64;
39 };
40}
···2829 nativeBuildInputs = [ meson ninja pkg-config ];
3031+ NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-U__ARM_NEON__";
32+33 meta = with lib; {
34 homepage = "https://github.com/Samsung/rlottie";
35 description = "A platform independent standalone c++ library for rendering vector based animations and art in realtime";
36 license = with licenses; [ mit bsd3 mpl11 ftl ];
37 platforms = platforms.all;
38 maintainers = with maintainers; [ CRTified ];
0039 };
40}
···56rustPlatform.buildRustPackage rec {
7 pname = "vopono";
8- version = "0.10.3";
910 src = fetchCrate {
11 inherit pname version;
12- sha256 = "sha256-hbijcLX4CwnQVyM7XZneZH1pFEmZceN0ougltldyWnc=";
13 };
1415- cargoHash = "sha256-FSgI6ZFRxl9uE1yA4LkdHcI2fymvMqkibxgTNTlJq5g=";
1617 meta = with lib; {
18 description = "Run applications through VPN connections in network namespaces";
···56rustPlatform.buildRustPackage rec {
7 pname = "vopono";
8+ version = "0.10.4";
910 src = fetchCrate {
11 inherit pname version;
12+ sha256 = "sha256-a9u8Ywxrdo4FFggotL8L5o5eDDu+MtcMVBG+jInXDVs=";
13 };
1415+ cargoHash = "sha256-oT74oj/6rKB1cuRiHnbc9QVUZQcDvvb4KZf09XuctNM=";
1617 meta = with lib; {
18 description = "Run applications through VPN connections in network namespaces";
+4-38
pkgs/tools/package-management/nix/default.nix
···5960 nix_2_5 = throw "nixVersions.nix_2_5 has been removed";
6162- # This is the last version of nix where https://github.com/NixOS/nix/issues/6572
63- # is not an unsolved breaking bug. Please keep it until the issue is fixed
64- # and in latest stable nix.
65- nix_2_6 = common {
66- version = "2.6.1";
67- sha256 = "sha256-E9iQ7f+9Z6xFcUvvfksTEfn8LsDfzmwrcRBC//5B3V0=";
68- };
6970- nix_2_7 = common {
71- version = "2.7.0";
72- sha256 = "sha256-m8tqCS6uHveDon5GSro5yZor9H+sHeh+v/veF1IGw24=";
73- patches = [
74- # remove when there's a 2.7.1 release
75- # https://github.com/NixOS/nix/pull/6297
76- # https://github.com/NixOS/nix/issues/6243
77- # https://github.com/NixOS/nixpkgs/issues/163374
78- (fetchpatch {
79- url = "https://github.com/NixOS/nix/commit/c9afca59e87afe7d716101e6a75565b4f4b631f7.patch";
80- sha256 = "sha256-xz7QnWVCI12lX1+K/Zr9UpB93b10t1HS9y/5n5FYf8Q=";
81- })
82- ];
83- };
8485- nix_2_8 = common {
86- version = "2.8.1";
87- sha256 = "sha256-zldZ4SiwkISFXxrbY/UdwooIZ3Z/I6qKxtpc3zD0T/o=";
88- };
8990- nix_2_9 = common {
91- version = "2.9.2";
92- sha256 = "sha256-uZCaBo9rdWRO/AlQMvVVjpAwzYijB2H5KKQqde6eHkg=";
93- patches = [
94- (fetchpatch {
95- # https://github.com/NixOS/nix/pull/7283
96- name = "fix-requires-non-existing-output.patch";
97- url = "https://github.com/NixOS/nix/commit/3ade5f5d6026b825a80bdcc221058c4f14e10a27.patch";
98- sha256 = "sha256-s1ybRFCjQaSGj7LKu0Z5g7UiHqdJGeD+iPoQL0vaiS0=";
99- })
100- patch-sqlite-exception
101- ];
102- };
103104 nix_2_10 = common {
105 version = "2.10.3";
···5960 nix_2_5 = throw "nixVersions.nix_2_5 has been removed";
6162+ nix_2_6 = throw "nixVersions.nix_2_6 has been removed";
0000006364+ nix_2_7 = throw "nixVersions.nix_2_7 has been removed";
00000000000006566+ nix_2_8 = throw "nixVersions.nix_2_8 has been removed";
0006768+ nix_2_9 = throw "nixVersions.nix_2_9 has been removed";
0000000000006970 nix_2_10 = common {
71 version = "2.10.3";
···151 ];
152 };
15300000000154 linux_5_17 = throw "linux 5.17 was removed because it has reached its end of life upstream";
155156 linux_5_18 = throw "linux 5.18 was removed because it has reached its end of life upstream";
···534 # realtime kernel packages
535 linux_rt_5_4 = packagesFor kernels.linux_rt_5_4;
536 linux_rt_5_10 = packagesFor kernels.linux_rt_5_10;
0537 };
538539 rpiPackages = {
···151 ];
152 };
153154+ linux_rt_5_15 = callPackage ../os-specific/linux/kernel/linux-rt-5.15.nix {
155+ kernelPatches = [
156+ kernelPatches.bridge_stp_helper
157+ kernelPatches.request_key_helper
158+ kernelPatches.export-rt-sched-migrate
159+ ];
160+ };
161+162 linux_5_17 = throw "linux 5.17 was removed because it has reached its end of life upstream";
163164 linux_5_18 = throw "linux 5.18 was removed because it has reached its end of life upstream";
···542 # realtime kernel packages
543 linux_rt_5_4 = packagesFor kernels.linux_rt_5_4;
544 linux_rt_5_10 = packagesFor kernels.linux_rt_5_10;
545+ linux_rt_5_15 = packagesFor kernels.linux_rt_5_15;
546 };
547548 rpiPackages = {