forked from jan-leila/nix-config
		
	moved user config back into user file from home file
This commit is contained in:
		
							parent
							
								
									ce2f59a386
								
							
						
					
					
						commit
						60fba00be9
					
				
					 13 changed files with 71 additions and 50 deletions
				
			
		|  | @ -14,9 +14,11 @@ | |||
|     ../../enviroments/server | ||||
|   ]; | ||||
| 
 | ||||
|   home-manager.users.leyla.config = { | ||||
|   nixos.users = { | ||||
|     leyla = { | ||||
|       isTerminalUser = true; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   boot.loader.grub = { | ||||
|     enable = true; | ||||
|  |  | |||
|  | @ -14,14 +14,14 @@ | |||
|     ../../enviroments/client | ||||
|   ]; | ||||
| 
 | ||||
|   home-manager.users = { | ||||
|     leyla.config = { | ||||
|   nixos.users = { | ||||
|     leyla = { | ||||
|       isDesktopUser = true; | ||||
|     }; | ||||
|     ester.config = { | ||||
|     ester = { | ||||
|       isDesktopUser = true; | ||||
|     }; | ||||
|     eve.config = { | ||||
|     eve = { | ||||
|       isDesktopUser = true; | ||||
|     }; | ||||
|   }; | ||||
|  |  | |||
|  | @ -13,16 +13,15 @@ | |||
| 
 | ||||
|     ../../enviroments/client | ||||
|   ]; | ||||
| 
 | ||||
|   home-manager.users = { | ||||
|     leyla.config = { | ||||
|   nixos.users = { | ||||
|     leyla = { | ||||
|       isDesktopUser = true; | ||||
|       hasGPU = true; | ||||
|     }; | ||||
|     ester.config = { | ||||
|     ester = { | ||||
|       isDesktopUser = true; | ||||
|     }; | ||||
|     eve.config = { | ||||
|     eve = { | ||||
|       isDesktopUser = true; | ||||
|     }; | ||||
|   }; | ||||
|  |  | |||
|  | @ -1,7 +1,14 @@ | |||
| {inputs, ...}: { | ||||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: { | ||||
|   imports = [./leyla ./ester ./eve]; | ||||
| 
 | ||||
|   users.mutableUsers = false; | ||||
| 
 | ||||
|   home-manager.users = import ./home.nix; | ||||
|   home-manager.users = import ./home.nix { | ||||
|     lib = lib; | ||||
|     config = config; | ||||
|   }; | ||||
| } | ||||
|  |  | |||
|  | @ -5,8 +5,12 @@ | |||
|   inputs, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.home-manager.users.ester; | ||||
|   cfg = config.nixos.users.ester; | ||||
| in { | ||||
|   options.nixos.users.ester = { | ||||
|     isDesktopUser = lib.mkEnableOption "install applications intended for desktop use"; | ||||
|   }; | ||||
| 
 | ||||
|   config = { | ||||
|     nixpkgs.config.allowUnfree = true; | ||||
| 
 | ||||
|  |  | |||
|  | @ -2,16 +2,15 @@ | |||
|   pkgs, | ||||
|   lib, | ||||
|   config, | ||||
|   osConfig, | ||||
|   ... | ||||
| }: { | ||||
|   options = { | ||||
|     isDesktopUser = lib.mkEnableOption "install applications intended for desktop use"; | ||||
|   }; | ||||
| 
 | ||||
| }: let | ||||
|   cfg = osConfig.nixos.users.ester; | ||||
| in { | ||||
|   config = { | ||||
|     home = { | ||||
|       username = "ester"; | ||||
|       homeDirectory = "/home/ester"; | ||||
|       homeDirectory = osConfig.users.users.ester.home; | ||||
| 
 | ||||
|       # This value determines the Home Manager release that your configuration is | ||||
|       # compatible with. This helps avoid breakage when a new Home Manager release | ||||
|  | @ -56,7 +55,7 @@ | |||
|         # EDITOR = "emacs"; | ||||
|       }; | ||||
| 
 | ||||
|       packages = lib.mkIf config.isDesktopUser ( | ||||
|       packages = lib.mkIf cfg.isDesktopUser ( | ||||
|         with pkgs; [ | ||||
|           firefox | ||||
|           bitwarden | ||||
|  |  | |||
|  | @ -5,8 +5,12 @@ | |||
|   inputs, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.home-manager.users.eve; | ||||
|   cfg = config.nixos.users.eve; | ||||
| in { | ||||
|   options.nixos.users.eve = { | ||||
|     isDesktopUser = lib.mkEnableOption "install applications intended for desktop use"; | ||||
|   }; | ||||
| 
 | ||||
|   config = { | ||||
|     nixpkgs.config.allowUnfree = true; | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,17 +1,15 @@ | |||
| { | ||||
|   pkgs, | ||||
|   lib, | ||||
|   config, | ||||
|   osConfig, | ||||
|   ... | ||||
| }: { | ||||
|   options = { | ||||
|     isDesktopUser = lib.mkEnableOption "install applications intended for desktop use"; | ||||
|   }; | ||||
| 
 | ||||
| }: let | ||||
|   cfg = osConfig.nixos.users.eve; | ||||
| in { | ||||
|   config = { | ||||
|     home = { | ||||
|       username = "eve"; | ||||
|       homeDirectory = "/home/eve"; | ||||
|       homeDirectory = osConfig.users.users.eve.home; | ||||
| 
 | ||||
|       # This value determines the Home Manager release that your configuration is | ||||
|       # compatible with. This helps avoid breakage when a new Home Manager release | ||||
|  | @ -56,7 +54,7 @@ | |||
|         # EDITOR = "emacs"; | ||||
|       }; | ||||
| 
 | ||||
|       packages = lib.mkIf config.isDesktopUser ( | ||||
|       packages = lib.mkIf cfg.isDesktopUser ( | ||||
|         with pkgs; [ | ||||
|           firefox | ||||
|           bitwarden | ||||
|  |  | |||
|  | @ -1,5 +1,9 @@ | |||
| { | ||||
|   leyla = import ./leyla/home.nix; | ||||
|   ester = import ./ester/home.nix; | ||||
|   eve = import ./eve/home.nix; | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: { | ||||
|   leyla = lib.mkIf (config.nixos.users.leyla.isDesktopUser || config.nixos.users.leyla.isTerminalUser) (import ./leyla/home.nix); | ||||
|   ester = lib.mkIf config.nixos.users.ester.isDesktopUser (import ./ester/home.nix); | ||||
|   eve = lib.mkIf config.nixos.users.eve.isDesktopUser (import ./eve/home.nix); | ||||
| } | ||||
|  |  | |||
|  | @ -4,8 +4,14 @@ | |||
|   inputs, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.home-manager.users.leyla; | ||||
|   cfg = config.nixos.users.leyla; | ||||
| in { | ||||
|   options.nixos.users.leyla = { | ||||
|     isDesktopUser = lib.mkEnableOption "install applications intended for desktop use"; | ||||
|     isTerminalUser = lib.mkEnableOption "install applications intended for terminal use"; | ||||
|     hasGPU = lib.mkEnableOption "installs gpu intensive programs"; | ||||
|   }; | ||||
| 
 | ||||
|   config = { | ||||
|     nixpkgs.config.allowUnfree = true; | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,25 +1,19 @@ | |||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   pkgs, | ||||
|   osConfig, | ||||
|   ... | ||||
| }: { | ||||
|   imports = [ | ||||
|     ./packages.nix | ||||
|   ]; | ||||
| 
 | ||||
|   options = { | ||||
|     isDesktopUser = lib.mkEnableOption "install applications intended for desktop use"; | ||||
|     isTerminalUser = lib.mkEnableOption "install applications intended for terminal use"; | ||||
|     hasGPU = lib.mkEnableOption "installs gpu intensive programs"; | ||||
|   }; | ||||
| 
 | ||||
|   config = { | ||||
|     # Home Manager needs a bit of information about you and the paths it should | ||||
|     # manage. | ||||
|     home = { | ||||
|       username = "leyla"; | ||||
|       homeDirectory = "/home/leyla"; | ||||
|       homeDirectory = osConfig.users.users.leyla.home; | ||||
| 
 | ||||
|       # This value determines the Home Manager release that your configuration is | ||||
|       # compatible with. This helps avoid breakage when a new Home Manager release | ||||
|  |  | |||
|  | @ -5,14 +5,16 @@ | |||
|   pkgs, | ||||
|   inputs, | ||||
|   ... | ||||
| }: { | ||||
| }: let | ||||
|   cfg = osConfig.nixos.users.leyla; | ||||
| in { | ||||
|   imports = [ | ||||
|     ./vscode.nix | ||||
|     ./firefox.nix | ||||
|   ]; | ||||
| 
 | ||||
|   home = { | ||||
|     packages = lib.mkIf (config.isDesktopUser || config.isTerminalUser) ( | ||||
|     packages = lib.mkIf (cfg.isDesktopUser || cfg.isTerminalUser) ( | ||||
|       lib.mkMerge [ | ||||
|         ( | ||||
|           with pkgs; [ | ||||
|  | @ -23,7 +25,7 @@ | |||
|           ] | ||||
|         ) | ||||
|         ( | ||||
|           lib.mkIf (!config.isTerminalUser) ( | ||||
|           lib.mkIf (!cfg.isTerminalUser) ( | ||||
|             with pkgs; [ | ||||
|               #foss platforms | ||||
|               signal-desktop | ||||
|  | @ -42,7 +44,7 @@ | |||
|               onionshare | ||||
|               easytag | ||||
|               # rhythmbox | ||||
|               (lib.mkIf config.hasGPU obs-studio) | ||||
|               (lib.mkIf cfg.hasGPU obs-studio) | ||||
|               # wireshark | ||||
|               # rpi-imager | ||||
|               # fritzing | ||||
|  | @ -51,7 +53,7 @@ | |||
|               discord | ||||
|               obsidian | ||||
|               steam | ||||
|               (lib.mkIf config.hasGPU davinci-resolve) | ||||
|               (lib.mkIf cfg.hasGPU davinci-resolve) | ||||
| 
 | ||||
|               # development tools | ||||
|               androidStudioPackages.canary | ||||
|  |  | |||
|  | @ -1,10 +1,12 @@ | |||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   osConfig, | ||||
|   pkgs, | ||||
|   inputs, | ||||
|   ... | ||||
| }: { | ||||
| }: let | ||||
|   cfg = osConfig.nixos.users.leyla; | ||||
| in { | ||||
|   nixpkgs = { | ||||
|     overlays = [ | ||||
|       inputs.nix-vscode-extensions.overlays.default | ||||
|  | @ -12,7 +14,7 @@ | |||
|   }; | ||||
| 
 | ||||
|   programs = { | ||||
|     bash.shellAliases = lib.mkIf config.isDesktopUser { | ||||
|     bash.shellAliases = lib.mkIf cfg.isDesktopUser { | ||||
|       code = "codium"; | ||||
|     }; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue