forked from jan-leila/nix-config
		
	moved openssh config into home manager configs
This commit is contained in:
		
							parent
							
								
									d760992a06
								
							
						
					
					
						commit
						2d5e37b1eb
					
				
					 6 changed files with 26 additions and 9 deletions
				
			
		|  | @ -3,5 +3,6 @@ | |||
|   imports = [ | ||||
|     ./flipperzero.nix | ||||
|     ./i18n.nix | ||||
|     ./openssh.nix | ||||
|   ]; | ||||
| } | ||||
|  |  | |||
							
								
								
									
										8
									
								
								modules/home-manager-modules/openssh.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								modules/home-manager-modules/openssh.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | |||
| {lib, ...}: { | ||||
|   options.programs = { | ||||
|     openssh.authorizedKeys = lib.mkOption { | ||||
|       type = lib.types.listOf lib.types.str; | ||||
|       default = []; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -3,5 +3,6 @@ | |||
|   imports = [ | ||||
|     ./flipperzero.nix | ||||
|     ./i18n.nix | ||||
|     ./openssh.nix | ||||
|   ]; | ||||
| } | ||||
|  |  | |||
							
								
								
									
										11
									
								
								modules/nixos-modules/home-manager/openssh.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								modules/nixos-modules/home-manager/openssh.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,11 @@ | |||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: { | ||||
|   users.users = | ||||
|     lib.attrsets.mapAttrs (name: value: { | ||||
|       openssh.authorizedKeys.keys = value.programs.openssh.authorizedKeys; | ||||
|     }) | ||||
|     config.home-manager.users; | ||||
| } | ||||
|  | @ -1,12 +1,4 @@ | |||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: { | ||||
|   users.users.leyla.openssh.authorizedKeys.keys = lib.mkIf config.host.users.leyla.isTerminalUser [ | ||||
|     "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJHeItmt8TRW43uNcOC+eIurYC7Eunc0V3LGocQqLaYj leyla@horizon" | ||||
|   ]; | ||||
| 
 | ||||
| {...}: { | ||||
|   services = { | ||||
|     openssh = { | ||||
|       enable = true; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue