nixpkgs/nixos
Martin Puppe 78ac812356 nixos/yggdrasil: fix configFile option
As far as I can tell the configFile option cannot have worked as
intended. The Yggdrasil systemd service uses a dynamic user. As it was,
there was no way to set the correct permissions on a config file
beforehand which would allow the dynamic user to read the config file
without making it readable for all users. But since the config file can
contain a private key it *must not* be world-readable.

The file must only be readable by root. The file has to be copied and
the permissions have to be fixed during service startup. This can either
be done in a ExecStartPre directive with the '+' prefix (which executes
that command with elevated privileges), or it can be done more
declarative with the LoadCredential directive. I have chosen the latter
approach because it delegates more work to systemd itself. It should be
noted that this has the minor tradeoff that the config file must not be
larger than 1 MB. This is a limit which systemd imposes on credential
files. But I think 1 MB ought to be enough for anybody ;).
2023-02-20 23:04:24 +01:00
..
doc/manual nixos/networkd-dispatcher: init 2023-02-19 04:42:25 -05:00
lib nixos-render-docs: use multiprocessing for options 2023-02-18 13:17:57 +01:00
maintainers treewide: fix backwards smart apostrophes 2023-02-06 07:24:42 -05:00
modules nixos/yggdrasil: fix configFile option 2023-02-20 23:04:24 +01:00
tests Merge pull request #215381 from lilyinstarlight/fix/make-initrd-ng-wrapped-executables 2023-02-20 14:11:48 -05:00
COPYING
default.nix
README
release-combined.nix nixos/tests/printing: split into service/socket 2022-12-07 15:57:45 +01:00
release-small.nix
release.nix nixos/manual: clean up default.nix a bit 2023-02-12 11:58:20 +01:00

*** NixOS ***

NixOS is a Linux distribution based on the purely functional package
management system Nix.  More information can be found at
https://nixos.org/nixos and in the manual in doc/manual.