[sops] Move into proper module
This commit is contained in:
		
							parent
							
								
									bab3778f18
								
							
						
					
					
						commit
						76d20746cb
					
				
					 5 changed files with 55 additions and 3 deletions
				
			
		
							
								
								
									
										25
									
								
								nixos/modules/programs/sops/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								nixos/modules/programs/sops/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,25 @@ | |||
| { config, lib, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.sisyphus.programs.sops; | ||||
| in { | ||||
|   options.sisyphus.programs.sops.enable = lib.mkEnableOption "Sops"; | ||||
| 
 | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ | ||||
|       sops | ||||
|     ]; | ||||
| 
 | ||||
|     sops = { | ||||
|       # Add secrets.yml to the Nix Store. | ||||
|       defaultSopsFile = ../../../secrets/secrets.yaml; | ||||
|       age = { | ||||
|         # Automatically import SSH keys as age keys. | ||||
|         sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; | ||||
|         # Use an age key that is expected to already be in the filesystem. | ||||
|         # You will need to place this file manually. | ||||
|         keyFile = "/var/lib/sops-nix/key.txt"; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue