From c0f10df4844a66a153f211e29aeee664cdfa4b52 Mon Sep 17 00:00:00 2001 From: alejandro-angulo Date: Sun, 28 Jul 2024 22:33:20 -0700 Subject: [PATCH] Converted btop from nixosModule to homeModule --- homes/x86_64-linux/alejandro/default.nix | 1 + modules/{nixos => home}/apps/btop/default.nix | 14 +++++++------- modules/nixos/system/monitoring/default.nix | 11 +++++------ systems/aarch64-linux/pi4/default.nix | 1 - systems/x86_64-linux/carbon/default.nix | 1 - 5 files changed, 13 insertions(+), 15 deletions(-) rename modules/{nixos => home}/apps/btop/default.nix (62%) diff --git a/homes/x86_64-linux/alejandro/default.nix b/homes/x86_64-linux/alejandro/default.nix index e1a127e..a10f33d 100644 --- a/homes/x86_64-linux/alejandro/default.nix +++ b/homes/x86_64-linux/alejandro/default.nix @@ -9,6 +9,7 @@ }: { aa = { apps = { + btop.enable = true; tmux.enable = true; }; diff --git a/modules/nixos/apps/btop/default.nix b/modules/home/apps/btop/default.nix similarity index 62% rename from modules/nixos/apps/btop/default.nix rename to modules/home/apps/btop/default.nix index c72298f..456b1c1 100644 --- a/modules/nixos/apps/btop/default.nix +++ b/modules/home/apps/btop/default.nix @@ -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; diff --git a/modules/nixos/system/monitoring/default.nix b/modules/nixos/system/monitoring/default.nix index bc851ff..07f8161 100644 --- a/modules/nixos/system/monitoring/default.nix +++ b/modules/nixos/system/monitoring/default.nix @@ -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; }; } diff --git a/systems/aarch64-linux/pi4/default.nix b/systems/aarch64-linux/pi4/default.nix index c44d286..b9ab34a 100644 --- a/systems/aarch64-linux/pi4/default.nix +++ b/systems/aarch64-linux/pi4/default.nix @@ -28,7 +28,6 @@ nix.enable = true; nix.useSelfhostedCache = true; - apps.btop.enable = true; apps.tmux.enable = true; services.tailscale = { diff --git a/systems/x86_64-linux/carbon/default.nix b/systems/x86_64-linux/carbon/default.nix index fb42a2b..91d1528 100644 --- a/systems/x86_64-linux/carbon/default.nix +++ b/systems/x86_64-linux/carbon/default.nix @@ -26,7 +26,6 @@ hardware.tlp.enable = true; system.zfs.enable = true; - apps.btop.enable = true; apps.yubikey.enable = true; };