forked from jan-leila/nix-config
		
	added users that can be disabled
This commit is contained in:
		
							parent
							
								
									b60bacf752
								
							
						
					
					
						commit
						3b76e4a8a8
					
				
					 6 changed files with 193 additions and 94 deletions
				
			
		
							
								
								
									
										30
									
								
								users/remote/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								users/remote/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,30 @@ | |||
| {  lib, config, ... }: | ||||
| let | ||||
|   cfg = config.users.remote; | ||||
| in | ||||
| { | ||||
|   options.users.remote = { | ||||
|     isNormalUser = lib.mkEnableOption "remote"; | ||||
|   }; | ||||
| 
 | ||||
|   config.users = { | ||||
|     groups.remote = {}; | ||||
| 
 | ||||
|     users.remote = lib.mkMerge [ | ||||
|       { | ||||
|         uid = 2000; | ||||
|         group = "remote"; | ||||
|       } | ||||
| 
 | ||||
|       ( | ||||
|         if cfg.isNormalUser then { | ||||
|           # extraGroups = [ "wheel" ]; | ||||
|           isNormalUser = true; | ||||
|           openssh.authorizedKeys.keys = []; | ||||
|         } else { | ||||
|           isSystemUser = true; | ||||
|         } | ||||
|       ) | ||||
|     ]; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue