Files
nix/hosts/common/user/configs/gui/btop/default.nix
Nikolaos Karaolidis 922eb479a0 Refactor theme module
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2024-07-27 16:23:32 +01:00

32 lines
623 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";
theme = {
templates."${hmConfig.xdg.configHome}/btop/themes/matugen.theme".source = ./theme.theme;
extraConfig = "${
lib.meta.getExe (
pkgs.writeShellApplication {
name = "reload-btop";
runtimeInputs = with pkgs; [ procps ];
text = "exec pkill btop -SIGUSR2";
}
)
} &";
};
};
}