nixpkgs/nixos/modules
Florian Klink 3c74e48d9c nixos/filesystems: ensure keys gid on /run/keys mountpoint
boot.specialFileSystems is used to describe mount points to be set up in
stage 1 and 2.

We use it to create /run/keys already there, so sshd-in-initrd scenarios
can consume keys sent over through nixops send-keys.

However, it seems the kernel only supports the gid=… option for tmpfs,
not ramfs, causing /run/keys to be owned by the root group, not keys
group.

This was/is worked around in nixops by running a chown root:keys
/run/keys whenever pushing keys [1], and as machines had to have pushed keys
to be usable, this was pretty much always the case.

This is causing regressions in setups not provisioned via nixops, that
still use /run/keys for secrets (through cloud provider startup scripts
for example), as suddenly being an owner of the "keys" group isn't
enough to access the folder.

This PR removes the defunct gid=… option in the mount script called in
stage 1 and 2, and introduces a tmpfiles rule which takes care of fixing
up permissions as part of sysinit.target (very early in systemd bootup,
so before regular services are started).

In case of nixops deployments, this doesn't change anything.
nixops-based deployments receiving secrets from nixops send-keys in
initrd will simply have the permissions already set once tmpfiles is
started.

Fixes #42344

[1]: 884d6c3994/nixops/backends/__init__.py (L267-L269)
2020-02-05 01:53:26 +01:00
..
config nixos/resolvconf: Remove useHostResolvConf option 2020-02-05 00:28:32 +01:00
hardware openrazer: 2.6.0 -> 2.7.0 2020-02-03 10:00:35 -08:00
i18n/input-method nixos/ibus: fix missing dconf profile 2020-01-06 20:30:37 +09:00
installer nixos-rebuild: --use-remote-sudo does not take an argument 2020-02-01 10:09:33 +01:00
misc nixos/locate: don't create /var/cache 2020-02-01 17:14:52 +00:00
profiles nixos/plasma5: drop enableQt4Support option 2019-11-22 09:01:05 +01:00
programs Merge pull request #77408 from petabyteboy/feature/geary-module 2020-01-28 18:45:45 -05:00
security nixos/duosec: fix configuration issue with "groups" option 2020-01-30 14:16:17 -05:00
services Merge pull request #78448 from snicket2100/irqbalance-systemd 2020-02-04 14:21:04 +00:00
system Merge pull request #77594 from Frostman/fix-grub-extrafiles-mirroredboots 2020-02-05 00:22:35 +01:00
tasks nixos/filesystems: ensure keys gid on /run/keys mountpoint 2020-02-05 01:53:26 +01:00
testing nixos/testing: remove leftover of virtualisation.qemu.program 2019-08-29 10:12:13 +02:00
virtualisation nixos/lxd: add package options for LXC, LXD and ZFS (#73902) 2020-01-30 14:51:12 +00:00
module-list.nix Merge pull request #78543 from Atemu/dnscrypt-proxy2-service 2020-02-02 23:02:06 -05:00
rename.nix nixos/dnscrypt-proxy2: init 2020-02-02 11:11:27 -05:00