mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 20:39:18 -08:00
refactor(mediabox): library mounts
This commit is contained in:
parent
228e2cf788
commit
59c61d021e
20 changed files with 416 additions and 101 deletions
33
modules/nixos/deluge.nix
Normal file
33
modules/nixos/deluge.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
cfg = config.services.deluge;
|
||||
in {
|
||||
options.services.deluge = with lib.types; {
|
||||
downloadDir = mkOption {
|
||||
type = path;
|
||||
default = cfg.dataDir + "/Downloads";
|
||||
};
|
||||
completedDir = mkOption {
|
||||
type = nullOr path;
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
config = {
|
||||
services.deluge = {
|
||||
config = mkMerge [
|
||||
{
|
||||
download_location = cfg.downloadDir;
|
||||
move_completed = cfg.completedDir != null;
|
||||
}
|
||||
(mkIf (cfg.completedDir != null) {
|
||||
move_completed_path = cfg.completedDir;
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/nixos/jackett.nix
Normal file
14
modules/nixos/jackett.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkOption;
|
||||
in {
|
||||
options.services.jackett = with lib.types; {
|
||||
port = mkOption {
|
||||
type = port;
|
||||
default = 9117;
|
||||
readOnly = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
};
|
||||
config = {
|
||||
paths = let
|
||||
paths = map (path: "${config.path}/media/${path}") config.subdirectories;
|
||||
paths = map (path: "${config.path}/${path}") config.subdirectories;
|
||||
path = singleton config.path;
|
||||
in mkOptionDefault (if config.subdirectories != null then paths else path);
|
||||
recursive = mkDefault true;
|
||||
|
|
|
|||
14
modules/nixos/radarr.nix
Normal file
14
modules/nixos/radarr.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkOption;
|
||||
in {
|
||||
options.services.radarr = with lib.types; {
|
||||
port = mkOption {
|
||||
type = port;
|
||||
default = 7878;
|
||||
readOnly = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/nixos/sonarr.nix
Normal file
14
modules/nixos/sonarr.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkOption;
|
||||
in {
|
||||
options.services.sonarr = with lib.types; {
|
||||
port = mkOption {
|
||||
type = port;
|
||||
default = 8989;
|
||||
readOnly = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue