mirror of
				https://github.com/Stunkymonkey/nixos.git
				synced 2025-10-31 17:52:10 +01:00 
			
		
		
		
	service/remote-build: init
This commit is contained in:
		
							parent
							
								
									72a34c777a
								
							
						
					
					
						commit
						b37162bd3f
					
				
					 3 changed files with 27 additions and 0 deletions
				
			
		
							
								
								
									
										24
									
								
								modules/services/remote-build/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								modules/services/remote-build/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,24 @@ | |||
| # manages remote builds | ||||
| { config, lib, pkgs, ... }: | ||||
| let | ||||
|   cfg = config.my.services.remote-build; | ||||
| in | ||||
| { | ||||
|   options.my.services.remote-build = { | ||||
|     enable = lib.mkEnableOption "remote-build user"; | ||||
|   }; | ||||
| 
 | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     # Create user for distributed nix builds | ||||
|     users.groups.nixremote = { }; | ||||
|     users.users.nixremote = { | ||||
|       isSystemUser = true; | ||||
|       group = "nixremote"; | ||||
|       home = "/home/nixremote"; | ||||
|       homeMode = "550"; # disable write | ||||
|       shell = pkgs.bashInteractive; | ||||
|       openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGYSzDdxqaNHmaaLqEvOK/vB65zvqoCebI3Nxzgg5smq root@thinkman" ]; | ||||
|     }; | ||||
|     nix.settings.trusted-users = [ "nixremote" ]; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Felix Buehler
						Felix Buehler