mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-23 02:23:55 -05:00
34 lines
847 B
Nix
34 lines
847 B
Nix
|
{
|
||
|
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"];
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|