From 0829792df01ff9229acaa06f8d4838c38f149b27 Mon Sep 17 00:00:00 2001 From: ibizaman Date: Sun, 10 Dec 2023 21:30:19 -0800 Subject: [PATCH] fix deluge backup permissions by adding backup user to media group --- modules/services/deluge.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/services/deluge.nix b/modules/services/deluge.nix index 21f0b66..203514c 100644 --- a/modules/services/deluge.nix +++ b/modules/services/deluge.nix @@ -182,16 +182,16 @@ in } ]; - systemd.services.deluged.serviceConfig.UMask = lib.mkForce "0027"; - systemd.services.deluged.serviceConfig.Group = lib.mkForce "media"; + # We want deluge to create files in the media group and to make those files group readable. users.users.deluge = { extraGroups = [ "media" ]; }; + systemd.services.deluged.serviceConfig.Group = lib.mkForce "media"; + systemd.services.deluged.serviceConfig.UMask = lib.mkForce "0027"; - users.groups.deluge = { - members = [ "backup" ]; - }; - + # We backup the whole deluge directory and set permissions for the backup user accordingly. + users.groups.deluge.members = [ "backup" ]; + users.groups.media.members = [ "backup" ]; shb.backup.instances.deluge = { sourceDirectories = [ config.services.deluge.dataDir