restructured project to split out home manager
This commit is contained in:
		
							parent
							
								
									c8e7944da5
								
							
						
					
					
						commit
						18f51a65c2
					
				
					 24 changed files with 421 additions and 254 deletions
				
			
		
							
								
								
									
										36
									
								
								enviroments/common/users/eve/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								enviroments/common/users/eve/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,36 @@ | |||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   inputs, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.nixos.users.eve; | ||||
| in { | ||||
|   options.nixos.users.eve = { | ||||
|     isDesktopUser = lib.mkEnableOption "install applications intended for desktop use"; | ||||
|   }; | ||||
| 
 | ||||
|   config = { | ||||
|     nixpkgs.config.allowUnfree = true; | ||||
| 
 | ||||
|     sops.secrets = lib.mkIf cfg.isDesktopUser { | ||||
|       "passwords/eve" = { | ||||
|         neededForUsers = true; | ||||
|         sopsFile = "${inputs.secrets}/user-passwords.yaml"; | ||||
|       }; | ||||
|     }; | ||||
| 
 | ||||
|     users.users.eve = ( | ||||
|       if cfg.isDesktopUser | ||||
|       then { | ||||
|         isNormalUser = true; | ||||
|         extraGroups = ["networkmanager"]; | ||||
| 
 | ||||
|         hashedPasswordFile = config.sops.secrets."passwords/eve".path; | ||||
|       } | ||||
|       else { | ||||
|         isSystemUser = true; | ||||
|       } | ||||
|     ); | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue