Commit graph

19 commits

Author SHA1 Message Date
h7x4 39e93806aa
Revert "various: replace systemd.services.<name>.{script,preStart} with ExecStart{,Pre}" 2025-10-31 11:03:32 +01:00
h7x4 783087ba35
nixos/h2o: replace preStart with ExecStartPre 2025-10-27 18:52:25 +09:00
Christian Theune 2d0a489125 nixos/acme: improve scalability - reduce superfluous unit activations
The previous setup caused all renewal units to be triggered upon
ever so slight changes in config. In larger setups (100+ certificates)
adding a new certificate caused high system load and/or large memory
consumption issues. The memory issues are already a alleviated with
the locking mechanism. However, this then causes long delays upwards
of multiple minutes depending on individual runs and also caused
superfluous activations.

In this change we streamline the overall setup of units:

1. The unit that other services can depend upon is 'acme-{cert}.service'.
We call this the 'base unit'. As this one as `RemainAfterExit` set
the `acme-finished-{cert}` targets are not required any longer.

2. We now always generate initial self-signed certificates to simplify
the dependency structure. This deprecates the `preliminarySelfsigned`
option.

3. The `acme-order-renew-{cert}` service gets activated after the base
unit and services using certificates have started and performs all acme
interactions. When it finishes others services (like web servers) will
be notified through the `reloadServices` option or they can use
`wantedBy` and `after` dependencies if they implement their own reload
units.

The renewal timer also triggers this unit.

4. The timer unit is explicitly blocked from being started by s-t-c.

5. Permission management has been cleaned up a bit: there was an
   inconsistency between having the .lego files set to 600 vs 640
   on the exposed side. This is unified to 640 now.

6. Exempt the account target from being restarted by s-t-c. This will
   happen automatically if something relevant to the account changes.
2025-08-08 16:28:42 +02:00
Wolfgang Walther 5a0711127c
treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
โทสฺตัล 7554581474 nixos/h2o: enable HTTP/3 via QUIC 2025-04-02 15:11:53 +07:00
โทสฺตัล 301581e073 nixos/h2o: typo 2025-04-02 15:11:53 +07:00
โทสฺตัล 7c8b3c88bb nixos/h2o: rename certNames → acmeCertNames
We are in agreement ðis improves the naming clarity
2025-03-29 12:31:46 +07:00
โทสฺตัล 0c67557015 nixos/h2o: disable OCSP stapling w/ Let’s Encrypt (support sunset)
It was noted in the TLS recommendations comment, but it actually should
be disabled everywhere if ACME is used as H2O has in enabled by default.

More info: <https://letsencrypt.org/2024/12/05/ending-ocsp/>
2025-03-29 12:31:46 +07:00
โทสฺตัล 28aa290145 nixos/h2o: add access to listen.host 2025-03-02 15:57:09 +07:00
โทสฺตัล dcee208a31 nixos/h2o: provide a settings example 2025-03-02 15:57:09 +07:00
โทสฺตัล b3f93d7292 nixos/h2o: TLS recommendations
From Mozilla’s ssl-config-generator project
2025-02-26 12:26:12 +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
โทสฺตัล 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
โทสฺตัล 2c1a09f1fe nixos/h2o: init module
Co-Authored-By: adisbladis <adis@blad.is>
2025-02-18 17:06:15 +07:00