Commit Graph

14 Commits

Author SHA1 Message Date
euxane
efc7aebda7 nixos/fcgiwrap: require explicit owner for UNIX sockets
The default in the previous option documentation was incorrect,
resulting in the UNIX socket to be unreachable except by root by
default.

This fixes the documentation and requires consumers to set values
explicitly for the socket's owning user and group.
2024-07-31 11:03:06 +02:00
euxane
4f2da6c9c1 nixos/fcgiwrap: add option migration instruction errors
This adds migration instructions for the removed global shared instance
configuration of fcgiwrap.

Adding those explicit messages to the previous options requires moving
the newly defined options from `services.fcgiwrap.*` to
`services.fcgiwrap.instances.*` due to an option namespace clash.

`mkRenamedOptionModule` was not used because the previous options do
not directly map to the new ones. In particular, `user` and `group`
were described as setting the socket's permission, but were actually
setting the process' running user.

Co-authored-by: Minijackson <minijackson@riseup.net>
2024-07-31 11:02:37 +02:00
euxane
51b246a1ac nixos/fcgiwrap: do not run as root by default
Use a dynamic user instead unless one is specified.
2024-06-22 19:45:25 +02:00
euxane
81f72015f0 nixos/fcgiwrap: add unix socket owner, private by default
This adds a few options to properly set the ownership and permissions
on UNIX local sockets, set to private by default.

Previously, the created UNIX local sockets could be used by any local
user. This was especially problematic when fcgiwrap is running as root
(the default).
2024-06-22 19:45:25 +02:00
euxane
289c1585c2 nixos/fcgiwrap: limit prefork type to positives 2024-06-22 19:45:25 +02:00
euxane
3955eaf450 nixos/fcgiwrap: improve readability of CLI args 2024-06-22 19:45:25 +02:00
euxane
022289f2fa nixos/fcgiwrap: group options logically, fix doc
Since we're already introducing some backward-incompatible change in
the previous commit, let's make the options more tidy, also preparing
for the introduction of more options.

This also fixes the documentation of the user and group options which
are applying to the service's running user, not the socket.
2024-06-22 19:45:25 +02:00
euxane
41419ca288 nixos/fcgiwrap: refactor for multiple instances
This allows configuring and starting independent instances of the
fgciwrap service, each with their own settings and running user,
instead of having to share a global one.

I could not use `mkRenamedOptionModule` on the previous options
because the aliases conflict with `attrsOf submodule` now defined at
`services.fcgiwrap`. This makes this change not backward compatible.
2024-06-22 19:45:15 +02:00
stuebinm
6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
Felix Buehler
327b0cff7a treewide: use more lib.optionalString 2023-04-07 13:38:33 +02:00
pennae
2e751c0772 treewide: automatically md-convert option descriptions
the conversion procedure is simple:

 - find all things that look like options, ie calls to either `mkOption`
   or `lib.mkOption` that take an attrset. remember the attrset as the
   option
 - for all options, find a `description` attribute who's value is not a
   call to `mdDoc` or `lib.mdDoc`
 - textually convert the entire value of the attribute to MD with a few
   simple regexes (the set from mdize-module.sh)
 - if the change produced a change in the manual output, discard
 - if the change kept the manual unchanged, add some text to the
   description to make sure we've actually found an option. if the
   manual changes this time, keep the converted description

this procedure converts 80% of nixos options to markdown. around 2000
options remain to be inspected, but most of those fail the "does not
change the manual output check": currently the MD conversion process
does not faithfully convert docbook tags like <code> and <package>, so
any option using such tags will not be converted at all.
2022-07-30 15:16:34 +02:00
Eric Sagnes
797d40767d fcgiwrap module: use enum 2016-11-04 13:04:52 +09:00
koral
d9078d03a3 Updated fcgiwrap's systemd unit to match upstream version. 2015-02-18 21:19:12 +00:00
Luca Bruno
12f06b3cc3 fcgiwrap: new package
Simple server for running CGI applications over FastCGI

https://nginx.localdomain.pl/wiki/FcgiWrap
2014-06-04 10:20:19 +02:00