From 178a51d75ea7e4de6cf3de0c4174de067b9f759d Mon Sep 17 00:00:00 2001 From: hektor Date: Mon, 28 Sep 2026 20:50:07 +0200 Subject: [PATCH] refactor(ncspot): nixify configuration --- dots/.config/ncspot/config.toml | 45 -------------------------- home/modules/music/default.nix | 56 +++++++++++++++++++++++++++++++-- 2 files changed, 53 insertions(+), 48 deletions(-) delete mode 100644 dots/.config/ncspot/config.toml diff --git a/dots/.config/ncspot/config.toml b/dots/.config/ncspot/config.toml deleted file mode 100644 index b6e7fe9..0000000 --- a/dots/.config/ncspot/config.toml +++ /dev/null @@ -1,45 +0,0 @@ -default_keybindings = false -flip_status_indicators = true -library_tabs = ["tracks", "albums", "artists", "playlists", "browse"] # remove podcasts tab - -[keybindings] -"Enter" = "play" -" " = "playpause" -"S" = "stop" -"<" = "seek -10000" -">" = "seek +10000" -"H" = "previous" -"L" = "next" -"r" = "repeat" -"z" = "shuffle" -"d" = "delete" -"s" = "save" -"O" = "open current" -"o" = "open selected" -"Backspace" = "back" -"A" = "goto artist" -"a" = "goto album" -"q" = "queue" -"J" = "shift down 1" -"K" = "shift up 1" -"c" = "clear" -"=" = "volup 1" -"-" = "voldown 1" -"1" = "focus queue" -"2" = "focus search" -"3" = "focus library" -"4" = "focus cover" -"h" = "move left 1" -"j" = "move down 1" -"k" = "move up 1" -"l" = "move right 1" -"g" = "move top" -"G" = "move bottom" -"t" = "sort added d" -"T" = "sort title a" -"y" = "share current" -"Y" = "share selected" -"U" = "update" - -backend="pipe" -notify="false" diff --git a/home/modules/music/default.nix b/home/modules/music/default.nix index d389e67..39a8300 100644 --- a/home/modules/music/default.nix +++ b/home/modules/music/default.nix @@ -2,7 +2,7 @@ config, lib, pkgs, - dotsPath, + osConfig ? null, ... }: @@ -23,10 +23,60 @@ in config = lib.mkIf cfg.enable { home.packages = [ spotifyWithWayland ]; - programs.ncspot = { enable = true; - settings = fromTOML (builtins.readFile (dotsPath + "/.config/ncspot/config.toml")); + settings = { + backend = lib.mkIf (osConfig.audio.enable or false) (lib.mkDefault "pulseaudio"); + default_keybindings = false; + flip_status_indicators = true; + library_tabs = [ + "tracks" + "albums" + "artists" + "playlists" + "browse" + ]; # remove podcasts tab + keybindings = { + "Enter" = "play"; + " " = "playpause"; + "S" = "stop"; + "<" = "seek -10000"; + ">" = "seek +10000"; + "H" = "previous"; + "L" = "next"; + "r" = "repeat"; + "z" = "shuffle"; + "d" = "delete"; + "s" = "save"; + "O" = "open current"; + "o" = "open selected"; + "Backspace" = "back"; + "A" = "goto artist"; + "a" = "goto album"; + "q" = "queue"; + "J" = "shift down 1"; + "K" = "shift up 1"; + "c" = "clear"; + "=" = "volup 1"; + "-" = "voldown 1"; + "1" = "focus queue"; + "2" = "focus search"; + "3" = "focus library"; + "4" = "focus cover"; + "h" = "move left 1"; + "j" = "move down 1"; + "k" = "move up 1"; + "l" = "move right 1"; + "g" = "move top"; + "G" = "move bottom"; + "t" = "sort added d"; + "T" = "sort title a"; + "y" = "share current"; + "Y" = "share selected"; + "U" = "update"; + notify = "false"; + }; + }; }; }; }