No...make it a module
This commit is contained in:
		
							parent
							
								
									4fe890b0a3
								
							
						
					
					
						commit
						1593539fea
					
				
							
								
								
									
										11
									
								
								flake.nix
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								flake.nix
									
									
									
									
									
								
							@ -25,8 +25,13 @@
 | 
			
		||||
      ];
 | 
			
		||||
    };
 | 
			
		||||
    mkHomeManagerConfiguration = { username, user-email, home-dir, enable-gui, pkgs, ... }:
 | 
			
		||||
      home-manager.lib.homeManagerConfiguration (import ./niten.nix {
 | 
			
		||||
      inherit username user-email home-dir enable-gui doom-emacs niten-doom-config pkgs;
 | 
			
		||||
    });
 | 
			
		||||
      home-manager.lib.homeManagerConfiguration {
 | 
			
		||||
        inherit pkgs;
 | 
			
		||||
	modules = [
 | 
			
		||||
          (import ./niten.nix {
 | 
			
		||||
            inherit username user-email home-dir enable-gui doom-emacs niten-doom-config;
 | 
			
		||||
          });
 | 
			
		||||
 	];
 | 
			
		||||
      };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -38,7 +38,7 @@ in {
 | 
			
		||||
        user-email = if (user-cfg.email != null) then
 | 
			
		||||
          user-cfg.email else "${username}@${config.instance.local-domain}";
 | 
			
		||||
        home-dir = config.users.users.${username}.home;
 | 
			
		||||
      in (import user-configs.${username} {
 | 
			
		||||
      in ((import user-configs.${username} {
 | 
			
		||||
        inherit
 | 
			
		||||
          doom-emacs
 | 
			
		||||
          niten-doom-config
 | 
			
		||||
@ -46,9 +46,7 @@ in {
 | 
			
		||||
          user-email
 | 
			
		||||
          home-dir
 | 
			
		||||
          enable-gui
 | 
			
		||||
	  lib,
 | 
			
		||||
	  pkgs;
 | 
			
		||||
      });
 | 
			
		||||
      }) { inherit pkgs; });
 | 
			
		||||
    in mapAttrs generate-config local-users;
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -5,10 +5,11 @@
 | 
			
		||||
  user-email,
 | 
			
		||||
  home-dir,
 | 
			
		||||
  enable-gui,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
 | 
			
		||||
{ pkgs, ... }:
 | 
			
		||||
 | 
			
		||||
with pkgs.lib;
 | 
			
		||||
let
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,7 @@
 | 
			
		||||
{ config, lib, pkgs, username, user-email, home-dir, enable-gui, ... }:
 | 
			
		||||
{ username, user-email, home-dir, enable-gui, ... }:
 | 
			
		||||
{ pkgs, ... }:
 | 
			
		||||
 | 
			
		||||
with lib; if !enable-gui then {} else {
 | 
			
		||||
with pkgs.lib; if !enable-gui then {} else {
 | 
			
		||||
  home = {
 | 
			
		||||
    packages = with pkgs; [
 | 
			
		||||
      fcitx5-configtool
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user