diff --git a/machines/moritz-server/configuration.nix b/machines/moritz-server/configuration.nix index f7e7752..f587a99 100644 --- a/machines/moritz-server/configuration.nix +++ b/machines/moritz-server/configuration.nix @@ -1,4 +1,8 @@ -{pkgs, ...}: { +{ + pkgs, + inputs, + ... +}: { imports = [ ../../modules/zfs_unencrypted.nix ../../modules/shared.nix @@ -8,6 +12,7 @@ ./mail-server.nix ./website/root ./navidrome.nix + inputs.home-manager.nixosModules.default ]; time.timeZone = "Europe/Berlin"; @@ -33,6 +38,19 @@ }; }; + home-manager = { + users.moritz = { + programs.home-manager.enable = true; + home = { + username = "moritz"; + homeDirectory = "/home/moritz"; + stateVersion = "25.05"; + }; + }; + useGlobalPkgs = true; + useUserPackages = true; + }; + # You can get your disk id by running the following command on the installer: # Replace with the IP of the installer printed on the screen or by running the `ip addr` command. # ssh root@ lsblk --output NAME,ID-LINK,FSTYPE,SIZE,MOUNTPOINT diff --git a/machines/moritz-server/navidrome.nix b/machines/moritz-server/navidrome.nix index d03fb98..5b52614 100644 --- a/machines/moritz-server/navidrome.nix +++ b/machines/moritz-server/navidrome.nix @@ -22,9 +22,31 @@ }; }; + home-manager.users.moritz.programs.beets = { + enable = true; + settings = { + directory = config.services.navidrome.settings.MusicFolder; + library = "/mnt/music/beet/musiclibrary.db"; + plugins = [ + "autobpm" + "mbsync" + "badfiles" + "chroma" + "duplicates" + "lyrics" + "replaygain" + ]; + musicbrainz.genres = true; + lyrics.synced = true; + }; + }; + services.borgbackup.jobs = { music = { - paths = config.services.navidrome.settings.MusicFolder; + paths = [ + config.services.navidrome.settings.MusicFolder + config.home-manager.users.moritz.programs.beets.settings.library + ]; repo = "u461386-sub1@u461386.your-storagebox.de:music"; doInit = true; encryption = {