Files
nix/hosts/common/user/configs/gui/btop/default.nix
2024-07-16 17:46:58 +03:00

35 lines
677 B
Nix

{
username ? throw "username argument is required",
}:
{
config,
lib,
pkgs,
...
}:
let
hmConfig = config.home-manager.users.${username};
in
{
home-manager.users.${username} = {
programs = {
btop.settings.color_theme = "matugen";
matugen.settings.templates.btop = {
input_path = ./theme.theme;
output_path = "${hmConfig.xdg.configHome}/btop/themes/matugen.theme";
};
};
theme.extraConfig = "${
lib.meta.getExe (
pkgs.writeShellApplication {
name = "reload-btop";
runtimeInputs = with pkgs; [ procps ];
text = "exec pkill btop -SIGUSR2";
}
)
} &";
};
}