From e06af89d888327f2b3b53f5a255ca109ac0d1c33 Mon Sep 17 00:00:00 2001 From: arcnmx Date: Mon, 4 Nov 2024 16:15:20 -0800 Subject: [PATCH] chore(deluge): filesystem permissions --- nixos/kyuuto/mount.nix | 17 +++++++++++++++++ systems/mediabox/nixos.nix | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/nixos/kyuuto/mount.nix b/nixos/kyuuto/mount.nix index 7e10722b..b1a32eb6 100644 --- a/nixos/kyuuto/mount.nix +++ b/nixos/kyuuto/mount.nix @@ -32,6 +32,10 @@ in { type = path; default = cfg.mountDir + "/library"; }; + downloadsDir = mkOption { + type = path; + default = cfg.mountDir + "/downloads"; + }; gameLibraryDir = mkOption { type = path; default = cfg.libraryDir + "/games"; @@ -91,6 +95,11 @@ in { inherit (shared) owner group; mode = mkDefault "2775"; }; + deluge = rec { + inherit (leaf) mode; + owner = toString (mapId 83); # deluge uid + group = owner; + }; setupFiles = [ { ${cfg.shareDir} = share; @@ -106,6 +115,14 @@ in { ${cfg.libraryDir + "/movies"} = leaf; ${cfg.libraryDir + "/software"} = leaf; ${cfg.libraryDir + "/books"} = leaf; + ${cfg.downloadsDir} = shared; + ${cfg.downloadsDir + "/deluge"} = deluge; + ${cfg.downloadsDir + "/deluge/download"} = + deluge + // { + group = "kyuuto"; + mode = mkDefault "2755"; + }; ${cfg.dataDir + "/minecraft/simplebackups"} = leaf // { diff --git a/systems/mediabox/nixos.nix b/systems/mediabox/nixos.nix index ef96e808..7582bd62 100644 --- a/systems/mediabox/nixos.nix +++ b/systems/mediabox/nixos.nix @@ -129,7 +129,7 @@ in { "${deluge.downloadDir}" = mkIf deluge.enable (mkMerge [ bind { - device = kyuuto.mountDir + "/downloads/deluge/download"; + device = kyuuto.downloadsDir + "/deluge/download"; } ]); };