Files
nix/hosts/common/configs/user/console/ncspot/default.nix
Nikolaos Karaolidis 09fbf7150c Use overlay
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2025-08-17 21:24:31 +03:00

29 lines
716 B
Nix

{ user, home }:
{ lib, pkgs, ... }:
{
environment.persistence = {
"/persist/state"."${home}/.config/ncspot/userstate.cbor" = { };
"/persist/cache"."${home}/.cache/ncspot" = { };
};
home-manager.users.${user} = {
programs.ncspot.enable = true;
theme = {
template.".config/ncspot/config.toml".source = ./theme.toml;
reloadExtraConfig = "${
lib.meta.getExe (
pkgs.writeShellApplication {
name = "reload-ncspot";
runtimeInputs = with pkgs; [ netcat ];
text = ''
printf "reload\n" | nc -W 1 -U "''${XDG_RUNTIME_DIR:-/run/user/$UID}/ncspot/ncspot.sock"
'';
}
)
} &";
};
};
}