refactor: moved nixos modules to dendrite pattern
This commit is contained in:
parent
df8dd110ad
commit
0ea11e0236
219 changed files with 4802 additions and 4820 deletions
23
modules/nixos/programs/lidarr/storage.nix
Normal file
23
modules/nixos/programs/lidarr/storage.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{...}: {
|
||||
flake.nixosModules.lidarr-storage = {
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
lidarr_data_directory = "/var/lib/lidarr/.config/Lidarr";
|
||||
in {
|
||||
options.services.lidarr.impermanence.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = config.services.lidarr.enable && config.storage.impermanence.enable;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.services.lidarr.enable {
|
||||
storage.datasets.replicate."system/root" = {
|
||||
directories."${lidarr_data_directory}" = lib.mkIf config.services.lidarr.impermanence.enable {
|
||||
owner.name = "lidarr";
|
||||
group.name = "lidarr";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue