Commit Graph

972 Commits

Author SHA1 Message Date
Felix Buehler
d35003e302 python311Packages.recursive-pth-loader: rename from recursivePthLoader 2024-01-25 22:13:17 +01:00
Nick Cao
9969fb7ff4
Merge pull request #281904 from Stunkymonkey/ttyd-fix-leakage
ttyd: add test & use systemd LoadCredential
2024-01-21 14:48:40 -05:00
Felix Buehler
c34493d7c0 ttyd: add test & use systemd LoadCredential 2024-01-20 21:01:51 +01:00
Jade Lovelace
6c5ab28fce nixos: fix a bunch of services missing dep on network-online.target
This was done by generating a truly hilarious configuration:

rg 'services\.[^.]+\.enable\t' opts-tags | cut -f1 > allonconfig.nix

The following were not tested due to other evaluation errors. They
should probably be manually audited.
services.amule
services.castopod
services.ceph
services.chatgpt-retrieval-plugin
services.clamsmtp
services.clight
services.dante
services.dex
services.discourse
services.dwm-status
services.engelsystem
services.foundationdb
services.frigate
services.frp
services.grocy
services.guacamole-client
services.hedgedoc
services.home-assistant
services.honk
services.imaginary
services.jitsi-meet
services.kerberos_server
services.limesurvey
services.mastodon
services.mediawiki
services.mobilizon
services.moodle
services.mosquitto
services.nextcloud
services.nullmailer
services.patroni
services.pfix-srsd
services.pgpkeyserver-lite
services.postfixadmin
services.roundcube
services.schleuder
services.self-deploy
services.slskd
services.spacecookie
services.statsd
services.step-ca
services.sympa
services.tsmBackup
services.vdirsyncer
services.vikunja
services.yandex-disk
services.zabbixWeb
2024-01-19 00:11:34 -08:00
Ryan Lahfa
6d8630efda
Merge pull request #270270 from SuperSandro2000/nginx-fastopen
nixos/nginx: filter more options when listening has quic
2024-01-12 20:01:29 +01:00
Ryan Lahfa
3287441158
Merge pull request #275484 from Izorkin/update-nginx-http3
nixos/nginx: disable automatic advertise of HTTP/3 protocol support
2024-01-12 19:49:18 +01:00
Peder Bergebakken Sundt
f489e99576
Merge pull request #277925 from Izorkin/update-nginx-http2
nixos/nginx: use new variant of http2 option for angie package
2024-01-12 01:40:18 +01:00
Izorkin
10c06cb060
nginx: enable ktls support by default 2024-01-01 12:02:57 +03:00
Izorkin
2fb0b52c50
nixos/nginx: disable automatic advertise of HTTP/3 protocol support
Automatic advertise in the `http` block about support of HTTP/3
protocol makes it difficult to automatically configure services
to work with it.
HTTP/3 availability must be manually advertised, preferably in
each location block.
2024-01-01 02:29:01 +03:00
Izorkin
d11fe979a2
nixos/nginx: use new variant of http2 option for angie package 2023-12-31 16:52:08 +03:00
Izorkin
ae5c0c1521
nixos/nginx: skip adding a comment to acmeLocation in nginx configuration 2023-12-30 23:50:02 +03:00
Izorkin
7f1b6d45af
nixos/nginx: change position acmeLocation in nginx configuration 2023-12-30 23:49:58 +03:00
Sandro Jäckel
157256f9dd
nixos/nginx: filter more options when listening has quic 2023-12-23 02:20:48 +01:00
Izorkin
86efccfa45
angie: init at 1.4.0 2023-12-17 22:43:13 +03:00
networkException
968905ab76
nixos/caddy: also increase socket send buffer size as recommended by upstream
this patch adjusts the `boot.kernel.sysctl."net.core.wmem_max"` to match the
value suggested in the quic-go wiki, just as `"net.core.wmem_max"`.

see fdfdc5df21
see https://github.com/quic-go/quic-go/issues/3923
2023-12-15 04:43:57 +01:00
Ryan Lahfa
3bb93fb2cd
Merge pull request #271506 from Misterio77/nginx-redirect-status-code 2023-12-12 14:05:33 +01:00
Gabriel Fontes
a3c60d2ddc
nixos/nginx: make redirect status code configurable
Add an option to configure which code globalRedirect and forceSSL use.
It previously was always 301 with no easy way to override.
2023-12-11 11:09:02 -03:00
Sandro Jäckel
78541e68eb
nixos/nginx: allow return to be an int 2023-12-08 15:04:27 +01:00
Florian Klink
4db2e0cc80
Merge pull request #272542 from Sohalt/caddy-config-file
nixos/caddy: use caddyfile adapter by default with explicit configFile
2023-12-07 09:07:35 +02:00
sohalt
3c6b3d71fa nixos/caddy: Use caddyfile adapter by default when explicitly specifying configFile 2023-12-06 21:57:21 +01:00
phaer
c40f706dc4 nixos/nginx/tailscale-auth: init module 2023-12-06 20:57:38 +01:00
Mario Rodas
15b5295311
Merge pull request #270847 from anthonyroussel/updates/tomcat_10_1_16
tomcat10: 10.1.15 -> 10.1.16
2023-11-30 22:38:23 -05:00
Anthony Roussel
9a5f5ee7d3
nixos/tomcat: add anthonyroussel to maintainers 2023-11-29 07:56:09 +01:00
h7x4
0a37316d6c
treewide: use mkPackageOption
This commit replaces a lot of usages of `mkOption` with the package
type, to be `mkPackageOption`, in order to reduce the amount of code.
2023-11-27 01:28:36 +01:00
Jonathan Davies
a1163912c2 nixos/caddy: Fixed RestartSec typo. 2023-11-24 11:03:32 +00:00
Emily
1f9a04da3f
Merge pull request #265465 from jpds/caddy-restart-on-failure
nixos/caddy: Set systemd unit to restart on-failure
2023-11-19 23:59:20 +01:00
Mario Rodas
d3deaacfb4
Merge pull request #263550 from anthonyroussel/updates/axis2
axis2: 1.7.9 -> 1.8.2, tomcat10: 10.0.27 -> 10.1.15, tomcat9: 9.0.75 -> 9.0.82
2023-11-19 09:39:19 -05:00
Ryan Lahfa
ccfe07c316
Merge pull request #266270 from Ma27/postgresql-ownership-15 2023-11-17 18:02:17 +01:00
Maximilian Bosch
48459567ae nixos/postgresql: drop ensurePermissions, fix ensureUsers for postgresql15
Closes #216989

First of all, a bit of context: in PostgreSQL, newly created users don't
have the CREATE privilege on the public schema of a database even with
`ALL PRIVILEGES` granted via `ensurePermissions` which is how most of
the DB users are currently set up "declaratively"[1]. This means e.g. a
freshly deployed Nextcloud service will break early because Nextcloud
itself cannot CREATE any tables in the public schema anymore.

The other issue here is that `ensurePermissions` is a mere hack. It's
effectively a mixture of SQL code (e.g. `DATABASE foo` is relying on how
a value is substituted in a query. You'd have to parse a subset of SQL
to actually know which object are permissions granted to for a user).

After analyzing the existing modules I realized that in every case with
a single exception[2] the UNIX system user is equal to the db user is
equal to the db name and I don't see a compelling reason why people
would change that in 99% of the cases. In fact, some modules would even
break if you'd change that because the declarations of the system user &
the db user are mixed up[3].

So I decided to go with something new which restricts the ways to use
`ensure*` options rather than expanding those[4]. Effectively this means
that

* The DB user _must_ be equal to the DB name.
* Permissions are granted via `ensureDBOwnerhip` for an attribute-set in
  `ensureUsers`. That way, the user is actually the owner and can
  perform `CREATE`.
* For such a postgres user, a database must be declared in
  `ensureDatabases`.

For anything else, a custom state management should be implemented. This
can either be `initialScript`, doing it manual, outside of the module or
by implementing proper state management for postgresql[5], but the
current state of `ensure*` isn't even declarative, but a convergent tool
which is what Nix actually claims to _not_ do.

Regarding existing setups: there are effectively two options:

* Leave everything as-is (assuming that system user == db user == db
  name): then the DB user will automatically become the DB owner and
  everything else stays the same.

* Drop the `createDatabase = true;` declarations: nothing will change
  because a removal of `ensure*` statements is ignored, so it doesn't
  matter at all whether this option is kept after the first deploy (and
  later on you'd usually restore from backups anyways).

  The DB user isn't the owner of the DB then, but for an existing setup
  this is irrelevant because CREATE on the public schema isn't revoked
  from existing users (only not granted for new users).

[1] not really declarative though because removals of these statements
    are simply ignored for instance: https://github.com/NixOS/nixpkgs/issues/206467
[2] `services.invidious`: I removed the `ensure*` part temporarily
    because it IMHO falls into the category "manage the state on your
    own" (see the commit message). See also
    https://github.com/NixOS/nixpkgs/pull/265857
[3] e.g. roundcube had `"DATABASE ${cfg.database.username}" = "ALL PRIVILEGES";`
[4] As opposed to other changes that are considered a potential fix, but
    also add more things like collation for DBs or passwords that are
    _never_ touched again when changing those.
[5] As suggested in e.g. https://github.com/NixOS/nixpkgs/issues/206467
2023-11-13 17:16:25 +01:00
github-actions[bot]
9776723357
Merge master into staging-next 2023-11-11 18:00:58 +00:00
Anthony Roussel
e30f48be94
treewide: fix redirected and broken URLs
Using the script in maintainers/scripts/update-redirected-urls.sh
2023-11-11 10:49:01 +01:00
Anthony Roussel
0908cc1a9e
nixos/tomcat: remove with lib; and use mkEnableOption 2023-11-07 11:35:38 +01:00
Jonathan Davies
79e7841ff7 nixos/caddy: Set systemd unit to restart on-failure whilst ignoring
error code 1.

This is what's recommended by systemd for long-running services and
helps with recovering from crashes.
2023-11-06 18:27:47 +00:00
github-actions[bot]
519b7ea0c3
Merge master into staging-next 2023-10-28 12:01:19 +00:00
Linus Heckemann
8670794565
Merge pull request #263203 from nikstur/replace-activation
Replace simple activationScripts
2023-10-28 10:17:15 +02:00
github-actions[bot]
4791949f6a
Merge master into staging-next 2023-10-28 00:02:23 +00:00
Artturi
61f2bd3178
Merge pull request #254386 from erikarvstedt/nginx-js-mime-type 2023-10-27 23:32:20 +03:00
github-actions[bot]
4c838ddf14
Merge master into staging-next 2023-10-27 18:01:08 +00:00
nikstur
d5a96d508b nixos/stargazer: replace activationScript via tmpfiles 2023-10-26 01:44:21 +02:00
Charles Hall
f5dcc015b9
nixos/garage: set StateDirectory if used at all
Changes the `mkIf` to trigger if *either* `data_dir`/`metadata_dir` use
`/var/lib/garage`, not only if both do. This is useful to me because I
want to store metadata in `/var/lib/garage` but I also want to store
data in a different mountpoint (via `data_dir` and `ReadWritePaths`).
2023-10-24 22:03:21 -07:00
github-actions[bot]
2c2c0379b7
Merge staging-next into staging 2023-10-23 12:02:04 +00:00
Sandro
f4d631c3d1
nixos/nginx: document implicit default port 80 2023-10-22 21:32:50 +02:00
github-actions[bot]
f4afba2014
Merge staging-next into staging 2023-10-21 18:01:53 +00:00
Ryan Lahfa
c5442c247f
Merge pull request #257262 from dongcarl/2023-09-nginx-fixes
nixos/nginx: Allow empty port for listen directive (for unix socket)
2023-10-21 17:26:57 +01:00
github-actions[bot]
02a21c89b8
Merge staging-next into staging 2023-10-20 18:01:21 +00:00
Bjørn Forsman
142074c2a8 nixos: fix bad mkEnableOption descriptions
Fix descriptions that don't account for (1) the "Whether to enable"
prefix or (2) the automatically added trailing dot.
2023-10-20 16:22:40 +01:00
github-actions[bot]
024144542b
Merge staging-next into staging 2023-10-19 18:01:22 +00:00
Bjørn Forsman
cc7791cfd9 nixos/lighttpd: add reload support
Allow reloading the webserver, which is useful when e.g there are new
certificates available that we want lighttpd to use, but don't want to
completely shut down the server.
2023-10-19 19:23:04 +02:00
github-actions[bot]
c12ce83e4e
Merge staging-next into staging 2023-10-18 18:01:38 +00:00
Florian Klink
770d1c5bcd nixos/garage: drop default package
This gives better control over what package of garage is running, and
makes upgrades a conscious decision.
2023-10-18 19:20:03 +02:00