29 lines
716 B
Nix
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"
|
|
'';
|
|
}
|
|
)
|
|
} &";
|
|
};
|
|
};
|
|
}
|