Make top level /var/lib/postfix as root:root 0755 After generating custom configs in /var/lib/postfix/conf, `postfix set-permissions` called, to perform all required tricks related to queue handling (postfix use file mode bits to keep some internal statuses, so `chmod -R` not recommended by authors, see comments in $out/libexec/postfix/post-install for details) Also post-install script was patched, to skip permission check/update for files inside $out, as well as symlinks following to $NIX_STORE. Config file `main.cf` extended with all default directory locations, to prevent post-install script from guessing and overwrite them. And finally all actions in activation script snippets performed by postmap/postalias/postfix tools from current build, not random one from paths.
*** NixOS *** NixOS is a Linux distribution based on the purely functional package management system Nix. More information can be found at http://nixos.org/nixos and in the manual in doc/manual.