services: navidrome: setup restic backups
This commit is contained in:
parent
8157595747
commit
c94356e24f
|
@ -114,7 +114,7 @@ in
|
|||
|
||||
navidrome = {
|
||||
enable = true;
|
||||
musicFolder = "${config.services.nextcloud.home}/data/alarsyo/files/Musique/Songs";
|
||||
musicFolder.path = "${config.services.nextcloud.home}/data/alarsyo/files/Musique/Songs";
|
||||
};
|
||||
|
||||
nextcloud = {
|
||||
|
|
|
@ -8,10 +8,13 @@ let
|
|||
in {
|
||||
options.my.services.navidrome = {
|
||||
enable = mkEnableOption "Navidrome";
|
||||
musicFolder = mkOption {
|
||||
musicFolder = {
|
||||
path = mkOption {
|
||||
type = types.str;
|
||||
default = "./music";
|
||||
};
|
||||
backup = mkEnableOption "backup the music folder";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -21,10 +24,15 @@ in {
|
|||
Address = "127.0.0.1";
|
||||
Port = 4533;
|
||||
LastFM.Enabled = false;
|
||||
MusicFolder = cfg.musicFolder;
|
||||
MusicFolder = cfg.musicFolder.path;
|
||||
};
|
||||
};
|
||||
|
||||
my.services.restic-backup = {
|
||||
paths = [ "/var/lib/navidrome" ] ++ optional cfg.musicFolder.backup cfg.musicFolder.path;
|
||||
exclude = [ "/var/lib/navidrome/cache" ];
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."music.${domain}" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = domain;
|
||||
|
|
Loading…
Reference in a new issue