Modularize ncspot
This commit is contained in:
parent
bf465d56fa
commit
60c0c5e888
3 changed files with 52 additions and 39 deletions
|
|
@ -19,6 +19,7 @@
|
|||
./keepassxc.nix
|
||||
./layout.nix
|
||||
./media.nix
|
||||
./ncspot.nix
|
||||
./nextcloud.nix
|
||||
./piper.nix
|
||||
./printing.nix
|
||||
|
|
|
|||
51
modules/programs/ncspot.nix
Normal file
51
modules/programs/ncspot.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{ lib, config, options, pkgs, ... }: {
|
||||
options.mods.ncspot = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = "Enables ncspot with a config";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.ncspot.enable
|
||||
(lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages = with pkgs; [ ncspot ];
|
||||
xdg.configFile."ncspot/config.toml".source =
|
||||
(pkgs.formats.toml { }).generate "ncspot" {
|
||||
notify = true;
|
||||
shuffle = true;
|
||||
cover_max_scale = 2;
|
||||
initial_screen = "library";
|
||||
library_tabs = [ "playlists" ];
|
||||
theme = {
|
||||
background = "#1a1b26";
|
||||
primary = "#9aa5ce";
|
||||
secondary = "#414868";
|
||||
title = "#9ece6a";
|
||||
playing = "#7aa2f7";
|
||||
playing_selected = "#bb9af7";
|
||||
playing_bg = "#24283b";
|
||||
highlight = "#c0caf5";
|
||||
highlight_bg = "#24283b";
|
||||
error = "#414868";
|
||||
error_bg = "#f7768e";
|
||||
statusbar = "#ff9e64";
|
||||
statusbar_progress = "#7aa2f7";
|
||||
statusbar_bg = "#1a1b26";
|
||||
cmdline = "#c0caf5";
|
||||
cmdline_bg = "#24283b";
|
||||
search_match = "#f7768e";
|
||||
};
|
||||
keybindings = {
|
||||
"j" = "move left 1";
|
||||
"k" = "move down 1";
|
||||
"l" = "move up 1";
|
||||
";" = "move right 1";
|
||||
};
|
||||
notification_format = {
|
||||
title = "%artists";
|
||||
body = "%title";
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
xdg.configFile."ncspot/config.toml".source =
|
||||
(pkgs.formats.toml { }).generate "ncspot" {
|
||||
notify = true;
|
||||
shuffle = true;
|
||||
cover_max_scale = 2;
|
||||
initial_screen = "library";
|
||||
library_tabs = [ "playlists" ];
|
||||
theme = {
|
||||
background = "#1a1b26";
|
||||
primary = "#9aa5ce";
|
||||
secondary = "#414868";
|
||||
title = "#9ece6a";
|
||||
playing = "#7aa2f7";
|
||||
playing_selected = "#bb9af7";
|
||||
playing_bg = "#24283b";
|
||||
highlight = "#c0caf5";
|
||||
highlight_bg = "#24283b";
|
||||
error = "#414868";
|
||||
error_bg = "#f7768e";
|
||||
statusbar = "#ff9e64";
|
||||
statusbar_progress = "#7aa2f7";
|
||||
statusbar_bg = "#1a1b26";
|
||||
cmdline = "#c0caf5";
|
||||
cmdline_bg = "#24283b";
|
||||
search_match = "#f7768e";
|
||||
};
|
||||
keybindings = {
|
||||
"j" = "move left 1";
|
||||
"k" = "move down 1";
|
||||
"l" = "move up 1";
|
||||
";" = "move right 1";
|
||||
};
|
||||
notification_format = {
|
||||
title = "%artists";
|
||||
body = "%title";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue