forked from fediversity/fediversity
		
	Get rid of useless self and providers arguments
				
					
				
			This commit is contained in:
		
							parent
							
								
									564938e52d
								
							
						
					
					
						commit
						ba97ed26d0
					
				
					 4 changed files with 10 additions and 14 deletions
				
			
		|  | @ -27,7 +27,6 @@ | |||
| 
 | ||||
|         ./deployment/flake-part.nix | ||||
|         ./infra/flake-part.nix | ||||
|         ./keys/flake-part.nix | ||||
|         ./services/flake-part.nix | ||||
|       ]; | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,7 +1,5 @@ | |||
| { | ||||
|   self, | ||||
|   inputs, | ||||
|   providers, | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
|  | @ -12,6 +10,10 @@ let | |||
|   inherit (lib.attrsets) concatMapAttrs optionalAttrs; | ||||
|   inherit (lib.strings) removeSuffix; | ||||
| 
 | ||||
|   secretsPrefix = ../../secrets; | ||||
|   secrets = import (secretsPrefix + "/secrets.nix"); | ||||
|   keys = import ../../keys; | ||||
| 
 | ||||
| in | ||||
| { | ||||
|   options = { | ||||
|  | @ -30,12 +32,10 @@ in | |||
| 
 | ||||
|   config = | ||||
|     let | ||||
|       hostPublicKey = self.keys.systems.${config.procolixVm.name}; | ||||
|       hostPublicKey = keys.systems.${config.procolixVm.name}; | ||||
| 
 | ||||
|     in | ||||
|     { | ||||
|       type = providers.local.exec; | ||||
| 
 | ||||
|       ssh = { | ||||
|         host = config.procolixVm.host; | ||||
|         hostPublicKey = hostPublicKey; | ||||
|  | @ -55,13 +55,13 @@ in | |||
|         age.secrets = concatMapAttrs ( | ||||
|           name: secret: | ||||
|           optionalAttrs (elem hostPublicKey secret.publicKeys) ({ | ||||
|             ${removeSuffix ".age" name}.file = ../../secrets + "/${name}"; | ||||
|             ${removeSuffix ".age" name}.file = secretsPrefix + "/${name}"; | ||||
|           }) | ||||
|         ) (import ../../secrets/secrets.nix); | ||||
|         ) secrets; | ||||
| 
 | ||||
|         ## FIXME: Remove direct root authentication once the NixOps4 NixOS | ||||
|         ## provider supports users with password-less sudo. | ||||
|         users.users.root.openssh.authorizedKeys.keys = attrValues self.keys.contributors; | ||||
|         users.users.root.openssh.authorizedKeys.keys = attrValues keys.contributors; | ||||
|       }; | ||||
|     }; | ||||
| } | ||||
|  |  | |||
|  | @ -1,5 +1,4 @@ | |||
| { | ||||
|   self, | ||||
|   inputs, | ||||
|   lib, | ||||
|   ... | ||||
|  | @ -13,7 +12,8 @@ let | |||
|     vmName: | ||||
|     { providers, ... }: | ||||
|     { | ||||
|       _module.args = { inherit self inputs providers; }; | ||||
|       _module.args = { inherit inputs; }; | ||||
|       type = providers.local.exec; | ||||
|       imports = [ | ||||
|         inputs.nixops4-nixos.modules.nixops4Resource.nixos | ||||
|         ./common/procolixResource.nix | ||||
|  |  | |||
|  | @ -1,3 +0,0 @@ | |||
| { | ||||
|   flake.keys = import ./.; | ||||
| } | ||||
		Loading…
	
	Add table
		
		Reference in a new issue