21 lines
563 B
Nix
21 lines
563 B
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}: let
|
|
radarr_data_directory = "/var/lib/radarr/.config/Radarr";
|
|
in {
|
|
options.services.radarr.impermanence.enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = config.services.radarr.enable && config.storage.impermanence.enable;
|
|
};
|
|
|
|
config = lib.mkIf config.services.radarr.enable {
|
|
storage.datasets.replicate."system/root" = {
|
|
directories."${radarr_data_directory}" = lib.mkIf config.services.radarr.impermanence.enable {
|
|
owner.name = "radarr";
|
|
group.name = "radarr";
|
|
};
|
|
};
|
|
};
|
|
}
|