Converted btop from nixosModule to homeModule
This commit is contained in:
		
							parent
							
								
									76bb3e5a76
								
							
						
					
					
						commit
						c0f10df484
					
				
					 5 changed files with 13 additions and 15 deletions
				
			
		| 
						 | 
				
			
			@ -9,6 +9,7 @@
 | 
			
		|||
}: {
 | 
			
		||||
  aa = {
 | 
			
		||||
    apps = {
 | 
			
		||||
      btop.enable = true;
 | 
			
		||||
      tmux.enable = true;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -28,7 +28,6 @@
 | 
			
		|||
    nix.enable = true;
 | 
			
		||||
    nix.useSelfhostedCache = true;
 | 
			
		||||
 | 
			
		||||
    apps.btop.enable = true;
 | 
			
		||||
    apps.tmux.enable = true;
 | 
			
		||||
 | 
			
		||||
    services.tailscale = {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,7 +26,6 @@
 | 
			
		|||
    hardware.tlp.enable = true;
 | 
			
		||||
 | 
			
		||||
    system.zfs.enable = true;
 | 
			
		||||
    apps.btop.enable = true;
 | 
			
		||||
    apps.yubikey.enable = true;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue