Rename and refactor Darwin-specific modules
Renamed several modules to better align with Darwin-specific configurations. Refactored configuration for Alacritty and removed it from system packages where not needed. Introduced Homebrew settings and cleaned up redundant entries in multiple Nix files.
This commit is contained in:
		
							parent
							
								
									f5670d2c0e
								
							
						
					
					
						commit
						cbe03d1060
					
				
					 8 changed files with 63 additions and 58 deletions
				
			
		| 
						 | 
				
			
			@ -9,11 +9,9 @@
 | 
			
		|||
    username = "harald";
 | 
			
		||||
    homeDirectory = "/Users/${config.home.username}";
 | 
			
		||||
    stateVersion = "23.11"; # Please read the comment before changing.
 | 
			
		||||
    # sessionPath = [ "$HOME/bin" ];
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  metacfg = {
 | 
			
		||||
 | 
			
		||||
    cli-apps = {
 | 
			
		||||
      bash.enable = true;
 | 
			
		||||
      fish.enable = true;
 | 
			
		||||
| 
						 | 
				
			
			@ -24,9 +22,15 @@
 | 
			
		|||
    };
 | 
			
		||||
 | 
			
		||||
    tools = {
 | 
			
		||||
      direnv.enable = true;
 | 
			
		||||
      #direnv.enable = true;
 | 
			
		||||
      ssh.enable = true;
 | 
			
		||||
      git.enable = true;
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
   xdg.configFile."alacritty/alacritty.toml".source = (pkgs.formats.toml { }).generate "alacritty-config" {
 | 
			
		||||
        font = {
 | 
			
		||||
          size = 17;
 | 
			
		||||
        };
 | 
			
		||||
    };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -24,7 +24,6 @@
 | 
			
		|||
    };
 | 
			
		||||
 | 
			
		||||
    tools = {
 | 
			
		||||
      direnv.enable = true;
 | 
			
		||||
      ssh.enable = true;
 | 
			
		||||
      git.enable = true;
 | 
			
		||||
    };
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -24,6 +24,11 @@ in
 | 
			
		|||
      nix-prefetch-git
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
    homebrew = {
 | 
			
		||||
      enable = true;
 | 
			
		||||
      onActivation.autoUpdate = false;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    nix =
 | 
			
		||||
      let
 | 
			
		||||
        users = [
 | 
			
		||||
| 
						 | 
				
			
			@ -34,7 +39,8 @@ in
 | 
			
		|||
      {
 | 
			
		||||
        package = cfg.package;
 | 
			
		||||
 | 
			
		||||
        settings = {
 | 
			
		||||
        settings =
 | 
			
		||||
          {
 | 
			
		||||
            experimental-features = "nix-command flakes";
 | 
			
		||||
            http-connections = 50;
 | 
			
		||||
            warn-dirty = false;
 | 
			
		||||
| 
						 | 
				
			
			@ -57,11 +63,11 @@ in
 | 
			
		|||
            # case it becomes important.
 | 
			
		||||
            extra-nix-path = "nixpkgs=flake:nixpkgs";
 | 
			
		||||
            build-users-group = "nixbld";
 | 
			
		||||
        };
 | 
			
		||||
        #// (lib.optionalAttrs config.metacfg.tools.direnv.enable {
 | 
			
		||||
        #  keep-outputs = true;
 | 
			
		||||
        #  keep-derivations = true;
 | 
			
		||||
        #});
 | 
			
		||||
          }
 | 
			
		||||
          // (lib.optionalAttrs config.metacfg.tools.direnv.enable {
 | 
			
		||||
            keep-outputs = true;
 | 
			
		||||
            keep-derivations = true;
 | 
			
		||||
          });
 | 
			
		||||
 | 
			
		||||
        gc = {
 | 
			
		||||
          automatic = true;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,7 +19,6 @@ in
 | 
			
		|||
  config = mkIf cfg.enable {
 | 
			
		||||
    environment = {
 | 
			
		||||
      systemPackages = with pkgs; [
 | 
			
		||||
        alacritty
 | 
			
		||||
        age
 | 
			
		||||
        delta
 | 
			
		||||
        git
 | 
			
		||||
| 
						 | 
				
			
			@ -45,6 +44,12 @@ in
 | 
			
		|||
      ];
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    programs = {
 | 
			
		||||
      fish.enable = true;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    environment.systemPath = [ /run/current-system/sw/bin ];
 | 
			
		||||
 | 
			
		||||
    programs = {
 | 
			
		||||
      bash = {
 | 
			
		||||
        ## shellInit = ''
 | 
			
		||||
| 
						 | 
				
			
			@ -53,7 +58,6 @@ in
 | 
			
		|||
          bind '"\e[B": history-search-forward'
 | 
			
		||||
        '';
 | 
			
		||||
      };
 | 
			
		||||
      fish.enable = true;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    security = {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										18
									
								
								modules/darwin/tools/alacritty/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								modules/darwin/tools/alacritty/default.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,18 @@
 | 
			
		|||
{
 | 
			
		||||
  lib,
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
let
 | 
			
		||||
  inherit (lib) mkEnableOption mkIf;
 | 
			
		||||
 | 
			
		||||
  cfg = config.metacfg.tools.alacritty;
 | 
			
		||||
in
 | 
			
		||||
{
 | 
			
		||||
  options.metacfg.tools.alacritty = {
 | 
			
		||||
    enable = mkEnableOption "alacritty";
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ alacritty ]; };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,29 +0,0 @@
 | 
			
		|||
{
 | 
			
		||||
  lib,
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
let
 | 
			
		||||
  inherit (lib) mkEnableOption mkIf;
 | 
			
		||||
 | 
			
		||||
  cfg = config.metacfg.tools.alacritty;
 | 
			
		||||
in
 | 
			
		||||
{
 | 
			
		||||
  options.metacfg.tools.alacritty = {
 | 
			
		||||
    enable = mkEnableOption "alacritty";
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  config = mkIf cfg.enable {
 | 
			
		||||
    home.packages = with pkgs; [
 | 
			
		||||
      alacritty
 | 
			
		||||
      (pkgs.nerdfonts.override {
 | 
			
		||||
        fonts = [
 | 
			
		||||
          "FiraCode"
 | 
			
		||||
          "DroidSansMono"
 | 
			
		||||
          "JetBrainsMono"
 | 
			
		||||
        ];
 | 
			
		||||
      })
 | 
			
		||||
    ];
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -6,6 +6,9 @@ with lib.metacfg;
 | 
			
		|||
    suites = {
 | 
			
		||||
      common = enabled;
 | 
			
		||||
    };
 | 
			
		||||
    tools = {
 | 
			
		||||
      direnv.enable = true;
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  environment.systemPackages = with pkgs; [
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue