frumar: fix /home/public permissions

auto-flake-update
Yorick van Pelt 2021-06-07 00:07:29 +02:00
parent d15e863f24
commit 9312548943
Signed by: yorick
GPG Key ID: D8D3CC6D951384DE
1 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@ in {
config = lib.mkIf cfg.enable {
systemd.services.nginx.serviceConfig = {
ProtectHome = "tmpfs";
UMask = lib.mkForce "0022";
BindReadOnlyPaths = [ "/home/public/public" ];
};
users.extraUsers.public = {
@ -16,7 +17,7 @@ in {
useDefaultShell = true;
isSystemUser = true;
openssh.authorizedKeys.keys = with (import ../sshkeys.nix); [ public ];
createHome = true;
createHome = false; # sets wrong permissions
};
services.nginx.virtualHosts.${cfg.vhost} = {
forceSSL = true;