Converted rofi to a home module
This commit is contained in:
		
							parent
							
								
									8b6e8fb936
								
							
						
					
					
						commit
						6cf34c66c8
					
				
					 4 changed files with 27 additions and 28 deletions
				
			
		| 
						 | 
				
			
			@ -18,6 +18,7 @@
 | 
			
		|||
      firefox.enable = true;
 | 
			
		||||
      gpg.enable = true;
 | 
			
		||||
      kitty.enable = true;
 | 
			
		||||
      rofi.enable = true;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    tools = {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										26
									
								
								modules/home/programs/rofi/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								modules/home/programs/rofi/default.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,26 @@
 | 
			
		|||
{
 | 
			
		||||
  config,
 | 
			
		||||
  lib,
 | 
			
		||||
  namespace,
 | 
			
		||||
  ...
 | 
			
		||||
}: let
 | 
			
		||||
  inherit (lib) mkEnableOption mkIf;
 | 
			
		||||
 | 
			
		||||
  cfg = config.${namespace}.programs.rofi;
 | 
			
		||||
in {
 | 
			
		||||
  options.${namespace}.programs.rofi = {
 | 
			
		||||
    enable = mkEnableOption "rofi";
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  config = mkIf cfg.enable {
 | 
			
		||||
    programs.rofi = {
 | 
			
		||||
      enable = true;
 | 
			
		||||
      # TODO: How to ensure this font is installed?
 | 
			
		||||
      font = "Hack Nerd Font 10";
 | 
			
		||||
      theme = "gruvbox-dark-hard";
 | 
			
		||||
      extraConfig = {
 | 
			
		||||
        show-icons = true;
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,27 +0,0 @@
 | 
			
		|||
{
 | 
			
		||||
  options,
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
with lib; let
 | 
			
		||||
  cfg = config.aa.desktop.addons.rofi;
 | 
			
		||||
in {
 | 
			
		||||
  options.aa.desktop.addons.rofi = with types; {
 | 
			
		||||
    enable = mkEnableOption "rofi";
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  config = mkIf cfg.enable {
 | 
			
		||||
    aa.home.extraOptions = {
 | 
			
		||||
      programs.rofi = {
 | 
			
		||||
        enable = true;
 | 
			
		||||
        font = "Hack Nerd Font 10";
 | 
			
		||||
        theme = "gruvbox-dark-hard";
 | 
			
		||||
        extraConfig = {
 | 
			
		||||
          show-icons = true;
 | 
			
		||||
        };
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -39,7 +39,6 @@ in {
 | 
			
		|||
      alacritty.enable = true;
 | 
			
		||||
      gammastep.enable = true;
 | 
			
		||||
      playerctl.enable = true;
 | 
			
		||||
      rofi.enable = true;
 | 
			
		||||
      swayidle.enable = true;
 | 
			
		||||
      swaylock.enable = true;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue