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 = { aa = {
apps = { apps = {
btop.enable = true;
tmux.enable = true; tmux.enable = true;
}; };

View file

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

View file

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

View file

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

View file

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