diff --git a/home/hosts/andromache/default.nix b/home/hosts/andromache/default.nix index 7bae7143..05dc49c5 100644 --- a/home/hosts/andromache/default.nix +++ b/home/hosts/andromache/default.nix @@ -59,6 +59,7 @@ shell.bash.aliases.lang-js = true; shell.bash.addBinToPath = true; audio.enable = true; + music.enable = true; terminal.enable = true; devenv.enable = true; keepassxc.enable = true; diff --git a/home/hosts/astyanax/default.nix b/home/hosts/astyanax/default.nix index 86fad548..50a31673 100644 --- a/home/hosts/astyanax/default.nix +++ b/home/hosts/astyanax/default.nix @@ -56,6 +56,7 @@ shell.bash.addBinToPath = true; my.yubikey.enable = true; audio.enable = true; + music.enable = true; terminal.enable = true; devenv.enable = true; keepassxc.enable = true; diff --git a/home/hosts/work/default.nix b/home/hosts/work/default.nix index 96e23b50..1bc063bf 100644 --- a/home/hosts/work/default.nix +++ b/home/hosts/work/default.nix @@ -65,6 +65,7 @@ browser.primary = "firefox"; devenv.enable = true; + music.enable = true; terminal.enable = true; keepassxc.enable = true; direnv.enable = true; diff --git a/home/modules/music/default.nix b/home/modules/music/default.nix index e5dbdb97..d389e67e 100644 --- a/home/modules/music/default.nix +++ b/home/modules/music/default.nix @@ -1,10 +1,13 @@ { - dotsPath, + config, + lib, pkgs, + dotsPath, ... }: let + cfg = config.music; spotifyWithWayland = pkgs.symlinkJoin { name = "spotify"; paths = [ pkgs.spotify ]; @@ -16,12 +19,14 @@ let }; in { - home.packages = with pkgs; [ - spotifyWithWayland - ]; + options.music.enable = lib.mkEnableOption "music"; - programs.ncspot = { - enable = true; - settings = builtins.fromTOML (builtins.readFile (dotsPath + "/.config/ncspot/config.toml")); + config = lib.mkIf cfg.enable { + home.packages = [ spotifyWithWayland ]; + + programs.ncspot = { + enable = true; + settings = fromTOML (builtins.readFile (dotsPath + "/.config/ncspot/config.toml")); + }; }; }