diff options
-rw-r--r-- | hosts/ahmed/git.linus.onl/default.nix | 4 | ||||
-rw-r--r-- | hosts/ahmed/torrenting/save-path.nix | 36 |
2 files changed, 24 insertions, 16 deletions
diff --git a/hosts/ahmed/git.linus.onl/default.nix b/hosts/ahmed/git.linus.onl/default.nix index 6f09c8c..1436eda 100644 --- a/hosts/ahmed/git.linus.onl/default.nix +++ b/hosts/ahmed/git.linus.onl/default.nix @@ -55,7 +55,9 @@ in { services.cgit."git.linus.onl" = { enable = true; scanPath = location; - settings = let package = config.services.cgit."git.linus.onl".package; in { + settings = let + package = config.services.cgit."git.linus.onl".package; + in { root-title = "Linus' public projects"; root-desc = "hello yes this is the git server"; root-readme = toString ./about.html; diff --git a/hosts/ahmed/torrenting/save-path.nix b/hosts/ahmed/torrenting/save-path.nix index 9d57f06..d58babb 100644 --- a/hosts/ahmed/torrenting/save-path.nix +++ b/hosts/ahmed/torrenting/save-path.nix @@ -1,7 +1,12 @@ -{pkgs,lib,config,...}: let +{ + pkgs, + lib, + config, + ... +}: let downloadPath = "/srv/media/"; - categories = [ "Movies" "Anime Movies" "Anime Series" "Series" "Stand-up" "Miscellaneous" ]; + categories = ["Movies" "Anime Movies" "Anime Series" "Series" "Stand-up" "Miscellaneous"]; in { # Create the directory to which media will be downloaded. This will be used # by qBittorent to hold files and Jellyfin will serve from it. @@ -13,15 +18,15 @@ in { # Configure qBittorrent to use the correct save path. services.qbittorrent.settings = { - BitTorrent = { - "Session\\DefaultSavePath" = assert builtins.elem "Miscellaneous" categories; "${downloadPath}/Miscellaneous"; - "Session\\TempPath" = "${config.services.qbittorrent.profile}/qBittorrent/temp"; - "Session\\TempPathEnabled" = true; - }; - Preferences = { - # Again?? - "Downloads\\SavePath" = downloadPath; - }; + BitTorrent = { + "Session\\DefaultSavePath" = assert builtins.elem "Miscellaneous" categories; "${downloadPath}/Miscellaneous"; + "Session\\TempPath" = "${config.services.qbittorrent.profile}/qBittorrent/temp"; + "Session\\TempPathEnabled" = true; + }; + Preferences = { + # Again?? + "Downloads\\SavePath" = downloadPath; + }; }; # Create categories for qBittorrent with correct save paths. @@ -37,12 +42,13 @@ in { User = config.services.qbittorrent.user; Group = config.services.qbittorrent.group; ExecStart = let - categoriesJson = lib.genAttrs categories (c: { "save_path" = "${downloadPath}/${c}"; }); + categoriesJson = lib.genAttrs categories (c: {"save_path" = "${downloadPath}/${c}";}); categoriesFile = (pkgs.formats.json {}).generate "categories.json" categoriesJson; categoriesPath = "${config.services.qbittorrent.profile}/qBittorrent/config/categories.json"; - in pkgs.writeShellScript "qbittorrent-create-categories.sh" '' - ln -s -f ${categoriesFile} ${categoriesPath} - ''; + in + pkgs.writeShellScript "qbittorrent-create-categories.sh" '' + ln -s -f ${categoriesFile} ${categoriesPath} + ''; }; }; |