nixcfg/nixosModules/services/syncthing/syncMusic.nix

34 lines
847 B
Nix
Raw Normal View History

2024-04-26 22:38:29 -04:00
{
pkgs,
lib,
config,
...
}: {
options = {
alyraffauf.services.syncthing.syncMusic = lib.mkOption {
description = "Whether to sync music folder.";
default = true;
type = lib.types.bool;
};
alyraffauf.services.syncthing.syncMusicPath = lib.mkOption {
description = "Whether to sync music folder.";
default = "/home/${config.alyraffauf.services.syncthing.user}/music";
type = lib.types.str;
};
};
config = lib.mkIf config.alyraffauf.services.syncthing.syncMusic {
services.syncthing = {
settings = {
folders = {
"music" = {
id = "6nzmu-z9der";
path = config.alyraffauf.services.syncthing.syncMusicPath;
devices = ["lavaridge" "mauville" "petalburg" "rustboro" "wattson"];
};
};
};
};
};
}