Converted btop from nixosModule to homeModule

This commit is contained in:
alejandro-angulo 2024-07-28 22:33:20 -07:00
parent 76bb3e5a76
commit c0f10df484
Signed by: alejandro-angulo
GPG key ID: 75579581C74554B6
5 changed files with 13 additions and 15 deletions

View file

@ -9,6 +9,7 @@
}: {
aa = {
apps = {
btop.enable = true;
tmux.enable = true;
};

View file

@ -1,19 +1,19 @@
{
options,
config,
pkgs,
lib,
namespace,
...
}:
with lib; let
cfg = config.aa.apps.btop;
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.apps.btop;
in {
options.aa.apps.btop = with types; {
options.${namespace}.apps.btop = {
enable = mkEnableOption "btop";
};
config = mkIf cfg.enable {
aa.home.extraOptions.programs.btop = {
programs.btop = {
enable = true;
settings = {
theme_background = false;

View file

@ -1,26 +1,25 @@
{
options,
config,
pkgs,
lib,
...
}:
with lib; let
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.aa.system.monitoring;
in {
options.aa.system.monitoring = with types; {
options.aa.system.monitoring = {
enable = mkEnableOption "monitoring";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
btop
htop
lm_sensors
powertop
];
powerManagement.powertop.enable = true;
aa.apps.btop.enable = true;
};
}

View file

@ -28,7 +28,6 @@
nix.enable = true;
nix.useSelfhostedCache = true;
apps.btop.enable = true;
apps.tmux.enable = true;
services.tailscale = {

View file

@ -26,7 +26,6 @@
hardware.tlp.enable = true;
system.zfs.enable = true;
apps.btop.enable = true;
apps.yubikey.enable = true;
};