Move all allowUnfreePredicate declarations to global configs to prevent the "last definition wins" merging issue. Unfree packages are now managed in two central locations: - NixOS system packages: nixos/common/global/default.nix - Home Manager packages: home-manager/sajenim/global/default.nix
		
			
				
	
	
		
			42 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
{outputs, lib, ...}: {
 | 
						|
  imports = [
 | 
						|
    ./zsh.nix
 | 
						|
  ];
 | 
						|
 | 
						|
  nixpkgs = {
 | 
						|
    overlays = [
 | 
						|
      outputs.overlays.additions
 | 
						|
      outputs.overlays.modifications
 | 
						|
      outputs.overlays.unstable-packages
 | 
						|
    ];
 | 
						|
    config = {
 | 
						|
      allowUnfree = false;
 | 
						|
      # Centralized unfree package allowlist.
 | 
						|
      # Note: nixpkgs.config.allowUnfreePredicate doesn't merge across modules - only the
 | 
						|
      # last definition wins. To maintain explicit control over unfree packages, we list
 | 
						|
      # all allowed packages here rather than scattering predicates across feature modules.
 | 
						|
      allowUnfreePredicate = pkg:
 | 
						|
        builtins.elem (lib.getName pkg) [
 | 
						|
          # Editors
 | 
						|
          "claude-code"
 | 
						|
          "idea-ultimate"
 | 
						|
          "idea-ultimate-with-plugins"
 | 
						|
          # Desktop
 | 
						|
          "discord"
 | 
						|
        ];
 | 
						|
    };
 | 
						|
  };
 | 
						|
 | 
						|
  programs.home-manager.enable = true;
 | 
						|
 | 
						|
  home = {
 | 
						|
    username = "sajenim";
 | 
						|
    homeDirectory = "/home/sajenim";
 | 
						|
    sessionVariables = {
 | 
						|
      EDITOR = "nvim";
 | 
						|
    };
 | 
						|
  };
 | 
						|
 | 
						|
  systemd.user.startServices = "sd-switch";
 | 
						|
  home.stateVersion = "22.11";
 | 
						|
}
 |