nixpkgs/nixos/modules
George Shammas 142d83f90e
nixos/postfix: postalias should not use source file permissions
Our postfix-setup service ensures that the directory is only writable by root.

postalias by default drops permissions to the user of the source file. In the
case of NixOS that file is in the nix store and thus always owned by root and
everything works.

The problem is that when using a nixos-container with user namespaces (`-U`)
then the nix store is owned by nobody/nogroup, and postfix-setup.service will be
unable to create or modify `aliases.db`.

Since the file would otherwise be owned by root, we should tell postfix to not
assume the user and permissions of the `aliases` file by setting -o and -p

From postalias(1)

> -o Do not release root privileges when processing a non-root input file. By
> default, postalias(1) drops root privileges and runs as the source file owner
> instead.

> -p Do not inherit the file access permissions from the input file when
> creating a new file. Instead, create a new file with default access
> permissions (mode 0644).
2023-09-16 08:22:45 -04:00
..
config nixos/user-groups: fixup of 5666a378 2023-09-13 11:44:19 +02:00
hardware nixos/nvidia: don't assume x11 is used.. 2023-09-14 18:19:15 +02:00
i18n/input-method uim: remove qt4, fix qt5 2023-09-04 13:54:50 +02:00
image modules/image/repart: Fix stripNixStorePrefix 2023-08-22 13:09:03 +02:00
installer nixos/iso-image: Remove leftover false dichotomy between console/serial 2023-09-06 14:10:09 -04:00
misc nixos/doc: Improve documentation of documentation 2023-08-12 22:28:04 +03:00
profiles nixos/installation-device: allow nix-copy for root/nixos user 2023-08-07 16:48:49 +02:00
programs nixos/environment: drop MOZ_PLUGIN_PATH 2023-09-15 09:49:19 -04:00
security nixos/acme: rename option credentialsFile to environmentFile 2023-09-11 16:34:20 +00:00
services nixos/postfix: postalias should not use source file permissions 2023-09-16 08:22:45 -04:00
system Merge pull request #254480 from andersk/memtest86plus-name 2023-09-12 18:19:50 +03:00
tasks nixos/swraid: only warn if swraid was explicitly enabled (#255426) 2023-09-16 12:19:19 +02:00
testing Merge pull request #219106 from m-bdf/nixos-testing-increase-device-timeout 2023-06-20 11:48:45 +02:00
virtualisation fix capitalization (#254542) 2023-09-15 09:59:11 +02:00
module-list.nix Merge pull request #254306 from dotlambda/tedicross-drop 2023-09-15 17:23:54 +00:00
rename.nix nodePackages.tedicross: drop 2023-09-13 15:00:38 -07:00