Commit graph

1158 commits

Author SHA1 Message Date
โทสฺตัล dcee208a31 nixos/h2o: provide a settings example 2025-03-02 15:57:09 +07:00
Maximilian Bosch 303bd80713
Merge: nixos/nginx: add locations."name".uwsgiPass option and use it (#346776) 2025-03-01 12:34:20 +01:00
โทสฺตัล b3f93d7292 nixos/h2o: TLS recommendations
From Mozilla’s ssl-config-generator project
2025-02-26 12:26:12 +07:00
โทสฺตัล 106d33952f nixos/h2o: virtual host settings default to empty 2025-02-26 10:49:06 +07:00
โทสฺตัล 093d5cfaea nixos/step-ca: add H2O test 2025-02-24 15:06:34 +07:00
โทสฺตัล 40f58bffcb nixos/h2o: basic ACME support 2025-02-24 15:06:34 +07:00
โทสฺตัล 1deab8b466 nixos/h2o: remove mode option as a potential footgun 2025-02-24 15:06:34 +07:00
โทสฺตัล e7e5ea5cee nixos/h2o: show package override that isn’t the default
The default was changed earlier this week
2025-02-24 15:06:34 +07:00
โทสฺตัล c554171c27 nixos/h2o: service name matches project 2025-02-24 15:06:34 +07:00
โทสฺตัล 14a33566d7 nixos/h2o: add virtual host serverAliases 2025-02-24 15:06:33 +07:00
โทสฺตัล 60287f0793 nixos/h2o: add missing Group to systemd 2025-02-24 15:06:33 +07:00
โทสฺตัล 760102b995 nixos/h2o: use { } for settings default 2025-02-24 15:06:33 +07:00
โทสฺตัล e7cf87f304 nixos/h2o: redo identity type to just list 2025-02-24 15:06:33 +07:00
Peder Bergebakken Sundt 527be14321 nixos/doc: convert links to manpages 2025-02-21 16:31:09 +01:00
Maximilian Bosch 2ad694fff9
nixos/nginx: remove custom HTTP_ header from recommendedUwsgiSettings
`uwsgi_pass` uses the uwsgi protocol instead of the HTTP protocol
(that's what `proxy_pass` is for). Also, the source IP is already
derived from the REMOTE_ADDR param that's specified by the uwsgi
defaults from nginx, similarily to how it's done for fcgi.

Hence, removing that since it seems not necessary (and perhaps even
wrong).
2025-02-21 13:48:07 +01:00
โทสฺตัล 2c1a09f1fe nixos/h2o: init module
Co-Authored-By: adisbladis <adis@blad.is>
2025-02-18 17:06:15 +07:00
dish 4851d05999 nixos/lighttpd/cgit: fix documentation link formatting 2025-02-12 21:03:21 +01:00
Peder Bergebakken Sundt 953f72e76e nixos/*: tag manpage references 2025-01-27 02:47:01 +01:00
Leona Maroni c068347f63
Fixes and housekeeping for the varnish module (#373747) 2025-01-21 19:38:51 +01:00
Artemis Tosini 4a75ef3d71
nixos/garage: add user-given path to ReadWritePaths (#373114) 2025-01-20 21:54:54 +00:00
K900 17f38bc01d nixos/acme: disable rate limiting to fix the test
Sometimes the nginx reload service fires too fast so systemd kills it.
2025-01-19 12:19:00 +03:00
Christian Theune 0640622eb1 nixos/varnish: fix stateDir to allow direct use of varnishadm 2025-01-16 18:47:16 +01:00
Christian Theune ba79b6d68b nixos/varnish: reduce overusage of lib (#208242) 2025-01-16 18:47:14 +01:00
cy 97f2724929 nixos/garage: add cything as maintainer 2025-01-15 01:03:50 -05:00
cy 0fe4739556 nixos/garage: add user-given path to ReadWritePaths
If the user has specified a custom data_dir or meta_dir, this results in
garage service failing with read-only filesystem error since the service
runs with DynamicUser by default.
2025-01-15 01:01:44 -05:00
github-actions[bot] 3fc2c8a91f
Merge master into staging-next 2025-01-10 06:05:08 +00:00
Lukas Werling ff07c07608 nixos/caddy: Fix default log file for http:// hostnames
Caddy hostnames can begin with http:// to disable automatic HTTPS.
The default value for services.caddy.<host>.logFormat puts the hostname
in the log filename, resulting in a broken path. Similarly, multiple
space-separated host names would not work before.

Since version 2.9.0 (commit 7c52e7a), caddy fails to start if it cannot
open the log file. This caused NixOS test failures (e.g.,
nixosTests.dokuwiki).
2025-01-07 23:22:04 +01:00
Wolfgang Walther cf127c9dc3
treewide: load structured attributes in all bash builders consistently
It's hard to put the sourcing of ./.attrs.sh into all builder
consistently - mistakes will happen. Thus, load structured attrs once in
make-derivation and then source the remaining builder on top.

This should fix quite a few builders with structured attributes in
principle. Most importantly it helps substitute / substituteAll, which
are required for bootstrap on some platforms.
2024-12-29 18:36:47 +01:00
Sandro Jäckel a810945475
nixos/nginx: default resolver.ipv6 to networking.enableIPv6 2024-12-25 03:58:32 +01:00
Arne Keller abeecc9b02
nixos/minio: add TLS certificates option (#340441) 2024-12-12 10:22:07 +01:00
Sandro Jäckel d1a28bbdb4
nixos/nginx: add locations."name".uwsgiPass and related options and use it 2024-12-11 01:07:02 +01:00
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
cy 248081c472
nixos/caddy: add environmentFile option (#363694) 2024-12-09 18:50:58 -05:00
Anders Johan Jamtli e5624846c3 nixos/minio: add certificatesDir option 2024-12-09 16:30:47 +01:00
nicoo 7a2e88f7c1 nixos/traefik: Replace custom config format handling with pkgs.formats 2024-12-04 20:50:45 +00:00
Sandro Jäckel 996f9e4f28
nixos/nginx: don't disable IPC
This also disables the memfd_create syscall which is required for
certain regex's when using pcre2.

see https://github.com/NixOS/nixpkgs/pull/355989#issuecomment-2506841275
2024-11-29 00:41:46 +01:00
Wolfgang Walther 9966353ee7
nixos/garage: remove assertions
Those were scheduled to be removed in 24.11, so let's do that.

Added in #311893.
2024-11-22 18:30:12 +01:00
K900 0453fe2395
{apache,caddy,nginx}: not "before" ACME certs using DNS validation (#336412) 2024-11-08 18:50:28 +03:00
ThinkChaos 3c2e82337d
nixos/web-servers: assert ACME cert access via service user and groups
Allows giving access using SupplementaryGroups.
2024-11-07 20:19:12 -05:00
ThinkChaos 03122b43c8
nixos/nginx: not "before" ACME certs using DNS validation
Relax dependency with certs that are validated via DNS challenge since
we know the HTTP server is not required for that validation.
This allows marking the server's service as depending on the cert.
2024-11-07 20:19:12 -05:00
ThinkChaos 26d6294deb
nixos/caddy: not "before" ACME certs using DNS validation
Relax dependency with certs that are validated via DNS challenge since
we know the HTTP server is not required for that validation.
This allows marking the server's service as depending on the cert.
2024-11-07 20:19:12 -05:00
ThinkChaos b99d3a4f8b
nixos/apache: not "before" ACME certs using DNS validation
Relax dependency with certs that are validated via DNS challenge since
we know the HTTP server is not required for that validation.
This allows marking the server's service as depending on the cert.
2024-11-07 20:18:20 -05:00
Ramses 3a1e2ab284
nginx: Create cryptographically secure htpasswd file (#347266) 2024-11-01 09:09:50 +01:00
Tristan Ross c47159b10e
nixos/nginx: use list for logrotate files attribute (#345537) 2024-10-28 19:47:12 -07:00
Rafael Kraut ef92d48263
nixos/nginx: use list for logrotate files attribute
This allows for easier extensibility.
2024-10-28 15:19:36 +01:00
Moraxyc c9086d8837
nixos/send: init 2024-10-28 00:23:07 +08:00
Maximilian Bosch e7d631432f
Merge: nixos/nginx: create 127.0.0.1 alias for status page (#349536) 2024-10-24 12:49:10 +02:00
Ryan Horiguchi 449a963b0e nixos/nginx: create 127.0.0.1 alias for status page 2024-10-23 22:41:00 +02:00
Izorkin b93bbf6406
nixos/nginx: remove rejectSSL assertion 2024-10-21 14:49:53 +03:00
Sandro Jäckel a155c718d3
nixos/nginx: expand proxyResolveWhileRunning's description 2024-10-08 13:36:13 +02:00
Victor Engmark 7d3b47a0fa
nginx: Create cryptographically secure htpasswd file
Requires the `htpasswd` command available from `pkgs.apacheHttpd`.
2024-10-08 23:14:26 +13:00
Victor Engmark fef047eba5
nginx: Use placeholders which play nicely with Bash
`<` and `>` are redirection operators.
2024-10-08 23:09:47 +13:00
Maximilian Bosch 5ee80e8120
Merge: nixos/nginx: remove shortand from defaultText (#346767) 2024-10-06 17:13:51 +02:00
Sandro 00461d0fcb
nixos/nginx: fix double slash in example (#346774) 2024-10-06 13:58:54 +02:00
Sandro Jäckel dd7ef21afc
nixos/nginx: fix double slash in example 2024-10-06 03:45:51 +02:00
Sandro b64b2d25c2
nixos/nginx: remove shortand from defaultText 2024-10-06 03:19:07 +02:00
Bjørn Forsman 48908e5b86 nixos: improve systemd slice names
Following
https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#Description=,
update slice names to be short, descriptive and capitalized.
2024-10-02 20:24:13 +02:00
h7x4 ed45f4b166 nixos/phpfpm: phpfpm.slice -> system-phpfpm.slice 2024-10-01 20:03:08 +02:00
h7x4 11f77694ac
nixos/bluemap: move to web-apps (#345353) 2024-09-30 17:53:27 +02:00
Florian Klink 9ff2ff44f8
nixos/garage: fix StateDirectory check to work with multiple data_dirs (#342903) 2024-09-30 12:27:06 +02:00
h7x4 c25213a9bd
nixos/bluemap: move to web-apps 2024-09-29 21:40:39 +02:00
h7x4 8b62732138
bluemap: 3.21 -> 5.4 (#332245) 2024-09-29 14:05:29 +02:00
Franz Pletz e1635a35b9
nixos/nginx: add option typesHashMaxSize (#341072) 2024-09-26 14:42:26 +02:00
Izorkin d856c0374d
nixos/nginx: add option typesHashMaxSize 2024-09-25 20:57:13 +03:00
h7x4 32f34d13c2
bluemap: 3.21 -> 5.3 2024-09-21 14:47:04 +02:00
Daniel Nagy 84b8922e82
nixos/darkhttpd: remove with lib; 2024-09-21 09:00:00 +02:00
Matt Moriarity 4d3d3e46fe nixos/garage: fix StateDirectory check to work with multiple data_dirs 2024-09-18 17:18:36 -06:00
Matt Moriarity cb905a5649 nixos/garage: add mjm as maintainer 2024-09-18 17:06:56 -06:00
Matt Moriarity e4fc65e079 nixos/garage: reformat 2024-09-18 17:05:09 -06:00
Peder Bergebakken Sundt b7bb0f2190 nixos/ttyd: reduce inherit (lib) 2024-09-08 19:00:53 +02:00
Peder Bergebakken Sundt a02d94279b nixos/ttyd: allow caFile=null when enableSSL=true
Co-authored-by: Douglas Mayle <douglas@mayle.org>
2024-09-08 18:55:44 +02:00
Florian Klink 3aca239152
nixos/caddy: restart caddy on config change when "enableReload" is turned off (#335983) 2024-09-07 22:22:24 +07:00
Sandro 3bd4ec61c2
nixos/stargazer: module bug fix and hardening (#294795) 2024-09-03 11:56:05 +02:00
laalsaas 9e5316a1c5 nixos/varnish: change default stateDir to /run
The stateDir, or as varnish calls it, the workdir should always be a
tmpfs. Otherwise, performance issues may occur. See:

- https://varnish-cache.org/docs/trunk/reference/varnishd.html#opt-n

- https://github.com/varnishcache/varnish-cache/issues/4121
2024-08-23 21:45:43 +02:00
Vivek fb3b6cd77b
update caddy service 2024-08-19 21:03:32 -07:00
gaykitty be1336d8b8 nixos/stargazer: harden systemd service 2024-08-17 18:32:48 -04:00
gaykitty 77430d388d nixos/stargazer: add allowCgiUser to make cgi-user option work
Previously the cgi-user option in stargazer was broken in this module
because stargazer didn't have CAP_SETUID and CAP_SETGID. cgi-user tells
stargazer to run cgi processes as a different user. I added an option
allowCgiUser that give stargazer these capabilities when enabled. I made
this an option because access to those syscalls greatly increases the
damage a RCE bug in stargazer could do. So they should only be enabled
if needed.
2024-08-17 18:32:48 -04:00
Emily 7ec755257a hydron: drop
This package was marked as vulnerable in
<https://github.com/NixOS/nixpkgs/pull/255959>, almost a year ago and
over a year after the project was archived upstream. The package and
module are unusable without bypassing a security warning in 23.05,
23.11, and 24.05.

Given that the package is intended as an organizer for
potentially‐untrusted media files, the vulnerability is critical and
leads to remote code execution, and there is basically no prospect
of upstream releasing a fix, remove the package and module entirely
for 24.11.
2024-08-03 20:27:19 +01:00
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
Jörg Thalheim 5356420466 treewide: remove unused with statements from maintainer lists
$ find -type f -name '*.nix' -print0 | xargs -P "$(nproc)" -0 sed -i \
  -e 's!with lib.maintainers; \[ *\];![ ];!' \
  -e 's!with maintainers; \[ *\];![ ];!'
2024-07-29 10:06:20 +08:00
TheRealGramdalf d66d94b37b
nixos/caddy: fix group option description (#328034) 2024-07-24 16:40:07 +08:00
Sven Slootweg 51a72a8271
nixos/caddy: fix module docs for new root syntax (#328444)
Old syntax no longer works; `root` now takes two arguments. Updated example in module documentation to reflect this.
2024-07-24 16:38:48 +08:00
Gavin John dffd5b699d
nixos/httpd: Use mkEnableOption 2024-07-04 13:44:24 +00:00
Thomas Gerbet 8ddb1bb721
Merge pull request #318599 from pacien/nixos-fcgiwrap-isolation
nixos/fcgiwrap: refactor to fix permissions
2024-07-02 21:52:33 +02:00
Sandro bd4241bcc8
Merge pull request #297826 from anthonyroussel/update-tomcat_connectors
apacheHttpdPackages.mod_jk: 1.2.48 -> 1.2.49, rename from tomcat_connectors
2024-07-02 20:26:13 +02:00
Sandro 08605eec2a
Merge pull request #311381 from minijackson/tomcat-port
nixos/tomcat: add 'port' option
2024-06-26 00:53:58 +02:00
Sandro 33f83c6252
Merge pull request #316977 from eclairevoyant/fix-mkEnableOption
treewide: fix mkEnableOption usage
2024-06-25 22:42:16 +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
Philip Taron 3ac49bcf94
nixos/bluemap: fix defaults issue with services.bluemap.host
The default for this value depends on `config.networking.domain`, which is typed as `types.nullOr types.str` in nixos/modules/tasks/network-interfaces.nix

As a result, the default for `services.bluemap.host` either has to be `types.nullOr types.str`, or we need to drop the default.

Based on PR feedback, this commit drops the default and requires configuration through the `services.bluemap.host` option.

While this is a breaking change, since the module is a month old, there should be very few users so far.
2024-06-20 21:05:03 -07:00
éclairevoyant 7d8742da87
treewide: fix mkEnableOption usage 2024-06-14 02:41:42 -04:00
Anthony Roussel e0a905ef96
apacheHttpdPackages.mod_jk: rename from tomcat_connectors 2024-06-07 08:41:04 +02:00
Sandro 0387dede7c
Merge pull request #316732 from SuperSandro2000/tailscale-auth 2024-06-03 12:49:31 +02:00
Sarah Brofeldt f7393d13fe nixos/garage: fix replication 1.0 assertion
Use the `cfg.package.version` (string) instead of the entire package so
users don't see  `error: value is a set while a string was expected`
instead of the intended assertion message.
2024-06-03 09:56:42 +02:00
Sandro Jäckel f643e4fa5b
nixos/tailscale-auth: fix enable option description 2024-06-02 22:30:42 +02:00