From 149de8faae1f5ac0e0db33a24f3686ceba3060c0 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 21 Mar 2024 15:16:11 -0600 Subject: [PATCH] [NixOS] Fix perms issues with syncthing --- nixos/syncthing.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nixos/syncthing.nix b/nixos/syncthing.nix index b3219eee..b54337c7 100644 --- a/nixos/syncthing.nix +++ b/nixos/syncthing.nix @@ -29,6 +29,12 @@ makeEnable config "modules.syncthing" true { mkdir -p /var/lib/syncthing/railbird ''; }; + systemd.services.syncthing = { + serviceConfig = { + AmbientCapabilities = "CAP_CHOWN"; + CapabilityBoundingSet = "CAP_CHOWN"; + }; + }; services.syncthing = { enable = true; settings = { @@ -37,11 +43,13 @@ makeEnable config "modules.syncthing" true { sync = { path = "~/sync"; devices = allDevices; + ignorePerms = true; copyOwnershipFromParent = true; }; railbird = { path = "~/railbird"; devices = allDevices; + ignorePerms = true; copyOwnershipFromParent = true; }; };