35 lines
671 B
Nix
35 lines
671 B
Nix
{
|
|
user ? throw "user argument is required",
|
|
}:
|
|
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
hmConfig = config.home-manager.users.${user.name};
|
|
in
|
|
{
|
|
home-manager.users.${user.name} = {
|
|
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";
|
|
}
|
|
)
|
|
} &";
|
|
};
|
|
}
|