Add heisenbridge #80
					 3 changed files with 22 additions and 31 deletions
				
			
		|  | @ -3,9 +3,13 @@ | ||||||
|   pkgs, |   pkgs, | ||||||
|   lib, |   lib, | ||||||
|   modulesPath, |   modulesPath, | ||||||
|  |   flake-inputs, | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   imports = [ |   imports = [ | ||||||
|  |     flake-inputs.sops-nix.nixosModules.sops | ||||||
|  |     flake-inputs.tlaternet-webserver.nixosModules.default | ||||||
|  | 
 | ||||||
|     "${modulesPath}/profiles/headless.nix" |     "${modulesPath}/profiles/headless.nix" | ||||||
|     "${modulesPath}/profiles/minimal.nix" |     "${modulesPath}/profiles/minimal.nix" | ||||||
|     (import ../modules) |     (import ../modules) | ||||||
|  |  | ||||||
							
								
								
									
										27
									
								
								flake.nix
									
										
									
									
									
								
							
							
						
						
									
										27
									
								
								flake.nix
									
										
									
									
									
								
							|  | @ -24,8 +24,8 @@ | ||||||
|     sops-nix, |     sops-nix, | ||||||
|     nvfetcher, |     nvfetcher, | ||||||
|     deploy-rs, |     deploy-rs, | ||||||
|     tlaternet-webserver, |     ... | ||||||
|   }: let |   } @ inputs: let | ||||||
|     system = "x86_64-linux"; |     system = "x86_64-linux"; | ||||||
|   in { |   in { | ||||||
|     ################## |     ################## | ||||||
|  | @ -33,9 +33,14 @@ | ||||||
|     ################## |     ################## | ||||||
|     nixosConfigurations = { |     nixosConfigurations = { | ||||||
|       # The actual system definition |       # The actual system definition | ||||||
|       tlaternet = self.lib.makeNixosSystem { |       tlaternet = nixpkgs.lib.nixosSystem { | ||||||
|         inherit system; |         inherit system; | ||||||
|         extraModules = [(import ./configuration/hardware-specific/linode)]; |         specialArgs.flake-inputs = inputs; | ||||||
|  | 
 | ||||||
|  |         modules = [ | ||||||
|  |           ./configuration | ||||||
|  |           ./configuration/hardware-specific/linode | ||||||
|  |         ]; | ||||||
|       }; |       }; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|  | @ -63,19 +68,21 @@ | ||||||
|     #################### |     #################### | ||||||
|     # Helper functions # |     # Helper functions # | ||||||
|     #################### |     #################### | ||||||
|     lib = import ./lib { |     lib = import ./lib {inherit (nixpkgs) lib;}; | ||||||
|       inherit nixpkgs sops-nix tlaternet-webserver; |  | ||||||
|       lib = nixpkgs.lib; |  | ||||||
|     }; |  | ||||||
| 
 | 
 | ||||||
|     ################### |     ################### | ||||||
|     # Utility scripts # |     # Utility scripts # | ||||||
|     ################### |     ################### | ||||||
|     packages.${system} = let |     packages.${system} = let | ||||||
|       inherit (nixpkgs.legacyPackages.${system}) writeShellScript; |       inherit (nixpkgs.legacyPackages.${system}) writeShellScript; | ||||||
|       vm = self.lib.makeNixosSystem { |       vm = nixpkgs.lib.nixosSystem { | ||||||
|         inherit system; |         inherit system; | ||||||
|         extraModules = [(import ./configuration/hardware-specific/vm.nix)]; |         specialArgs.flake-inputs = inputs; | ||||||
|  | 
 | ||||||
|  |         modules = [ | ||||||
|  |           ./configuration | ||||||
|  |           ./configuration/hardware-specific/vm.nix | ||||||
|  |         ]; | ||||||
|       }; |       }; | ||||||
|     in { |     in { | ||||||
|       default = vm.config.system.build.vm; |       default = vm.config.system.build.vm; | ||||||
|  |  | ||||||
|  | @ -1,9 +1,4 @@ | ||||||
| { | {lib}: let | ||||||
|   lib, |  | ||||||
|   nixpkgs, |  | ||||||
|   sops-nix, |  | ||||||
|   tlaternet-webserver, |  | ||||||
| }: let |  | ||||||
|   inherit (lib.attrsets) mapAttrsToList; |   inherit (lib.attrsets) mapAttrsToList; | ||||||
|   inherit (lib.strings) concatStringsSep; |   inherit (lib.strings) concatStringsSep; | ||||||
| in { | in { | ||||||
|  | @ -12,19 +7,4 @@ in { | ||||||
|     (mapAttrsToList |     (mapAttrsToList | ||||||
|       (host: vm: "hostfwd=::${host}-:${vm}") |       (host: vm: "hostfwd=::${host}-:${vm}") | ||||||
|       portMapping); |       portMapping); | ||||||
| 
 |  | ||||||
|   makeNixosSystem = { |  | ||||||
|     system, |  | ||||||
|     extraModules, |  | ||||||
|   }: |  | ||||||
|     nixpkgs.lib.nixosSystem { |  | ||||||
|       inherit system; |  | ||||||
|       modules = |  | ||||||
|         [ |  | ||||||
|           sops-nix.nixosModules.sops |  | ||||||
|           tlaternet-webserver.nixosModules.default |  | ||||||
|           (import ../configuration) |  | ||||||
|         ] |  | ||||||
|         ++ extraModules; |  | ||||||
|     }; |  | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue