From dd77a799f813dfb7a49aba2aacfbfb69d79b92b3 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Mon, 13 Nov 2023 23:23:15 +0100 Subject: nixos/transmission: /run/host must be writable, fixes #258793 --- nixos/modules/services/torrent/transmission.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nixos/modules/services/torrent') diff --git a/nixos/modules/services/torrent/transmission.nix b/nixos/modules/services/torrent/transmission.nix index 5efb9334ea03e..d9f2a5f62529e 100644 --- a/nixos/modules/services/torrent/transmission.nix +++ b/nixos/modules/services/torrent/transmission.nix @@ -314,6 +314,9 @@ in BindPaths = [ "${cfg.home}/${settingsDir}" cfg.settings.download-dir + # Transmission may need to read in the host's /run (eg. /run/systemd/resolve) + # or write in its private /run (eg. /run/host). + "/run" ] ++ optional cfg.settings.incomplete-dir-enabled cfg.settings.incomplete-dir ++ @@ -324,7 +327,6 @@ in # an AppArmor profile is provided to get a confinement based upon paths and rights. builtins.storeDir "/etc" - "/run" ] ++ optional (cfg.settings.script-torrent-done-enabled && cfg.settings.script-torrent-done-filename != null) -- cgit 1.4.1 From accbc67b046c4391d6bb6340044b79fb15f34020 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Mon, 13 Nov 2023 23:24:55 +0100 Subject: nixos/transmission: use mkDefault on PrivateMounts and PrivateUsers --- nixos/modules/services/torrent/transmission.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nixos/modules/services/torrent') diff --git a/nixos/modules/services/torrent/transmission.nix b/nixos/modules/services/torrent/transmission.nix index d9f2a5f62529e..12aeb411477b1 100644 --- a/nixos/modules/services/torrent/transmission.nix +++ b/nixos/modules/services/torrent/transmission.nix @@ -351,10 +351,10 @@ in MemoryDenyWriteExecute = true; NoNewPrivileges = true; PrivateDevices = true; - PrivateMounts = true; + PrivateMounts = mkDefault true; PrivateNetwork = mkDefault false; PrivateTmp = true; - PrivateUsers = true; + PrivateUsers = mkDefault true; ProtectClock = true; ProtectControlGroups = true; # ProtectHome=true would not allow BindPaths= to work across /home, -- cgit 1.4.1