Compare commits
	
		
			1 commit
		
	
	
		
			daf0f9a987
			...
			d8457079cf
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| d8457079cf | 
					 5 changed files with 31 additions and 42 deletions
				
			
		|  | @ -3,13 +3,9 @@ | ||||||
|   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) | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   lib, |   lib, | ||||||
|   flake-inputs, |  | ||||||
|   ... |   ... | ||||||
| }: let | }: let | ||||||
|   inherit (lib.strings) concatMapStringsSep; |   inherit (lib.strings) concatMapStringsSep; | ||||||
|  | @ -13,7 +12,6 @@ | ||||||
| in { | in { | ||||||
|   services.matrix-conduit = { |   services.matrix-conduit = { | ||||||
|     enable = true; |     enable = true; | ||||||
|     package = flake-inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.conduit-matrix; |  | ||||||
|     settings.global = { |     settings.global = { | ||||||
|       address = "127.0.0.1"; |       address = "127.0.0.1"; | ||||||
|       server_name = domain; |       server_name = domain; | ||||||
|  |  | ||||||
							
								
								
									
										17
									
								
								flake.lock
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										17
									
								
								flake.lock
									
										
									
										generated
									
									
									
								
							|  | @ -378,22 +378,6 @@ | ||||||
|         "type": "github" |         "type": "github" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "nixpkgs-unstable": { |  | ||||||
|       "locked": { |  | ||||||
|         "lastModified": 1677342105, |  | ||||||
|         "narHash": "sha256-kv1fpkfCJGb0M+LZaCHFUuIS9kRIwyVgupHu86Y28nc=", |  | ||||||
|         "owner": "nixos", |  | ||||||
|         "repo": "nixpkgs", |  | ||||||
|         "rev": "b1f87ca164a9684404c8829b851c3586c4d9f089", |  | ||||||
|         "type": "github" |  | ||||||
|       }, |  | ||||||
|       "original": { |  | ||||||
|         "owner": "nixos", |  | ||||||
|         "ref": "nixos-unstable", |  | ||||||
|         "repo": "nixpkgs", |  | ||||||
|         "type": "github" |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "nixpkgs_2": { |     "nixpkgs_2": { | ||||||
|       "locked": { |       "locked": { | ||||||
|         "lastModified": 1673345971, |         "lastModified": 1673345971, | ||||||
|  | @ -495,7 +479,6 @@ | ||||||
|       "inputs": { |       "inputs": { | ||||||
|         "deploy-rs": "deploy-rs", |         "deploy-rs": "deploy-rs", | ||||||
|         "nixpkgs": "nixpkgs_2", |         "nixpkgs": "nixpkgs_2", | ||||||
|         "nixpkgs-unstable": "nixpkgs-unstable", |  | ||||||
|         "nvfetcher": "nvfetcher", |         "nvfetcher": "nvfetcher", | ||||||
|         "sops-nix": "sops-nix", |         "sops-nix": "sops-nix", | ||||||
|         "tlaternet-webserver": "tlaternet-webserver" |         "tlaternet-webserver": "tlaternet-webserver" | ||||||
|  |  | ||||||
							
								
								
									
										28
									
								
								flake.nix
									
										
									
									
									
								
							
							
						
						
									
										28
									
								
								flake.nix
									
										
									
									
									
								
							|  | @ -3,7 +3,6 @@ | ||||||
| 
 | 
 | ||||||
|   inputs = { |   inputs = { | ||||||
|     nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11"; |     nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11"; | ||||||
|     nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; |  | ||||||
|     deploy-rs.url = "github:serokell/deploy-rs"; |     deploy-rs.url = "github:serokell/deploy-rs"; | ||||||
|     sops-nix = { |     sops-nix = { | ||||||
|       url = "github:Mic92/sops-nix"; |       url = "github:Mic92/sops-nix"; | ||||||
|  | @ -25,8 +24,8 @@ | ||||||
|     sops-nix, |     sops-nix, | ||||||
|     nvfetcher, |     nvfetcher, | ||||||
|     deploy-rs, |     deploy-rs, | ||||||
|     ... |     tlaternet-webserver, | ||||||
|   } @ inputs: let |   }: let | ||||||
|     system = "x86_64-linux"; |     system = "x86_64-linux"; | ||||||
|   in { |   in { | ||||||
|     ################## |     ################## | ||||||
|  | @ -34,14 +33,9 @@ | ||||||
|     ################## |     ################## | ||||||
|     nixosConfigurations = { |     nixosConfigurations = { | ||||||
|       # The actual system definition |       # The actual system definition | ||||||
|       tlaternet = nixpkgs.lib.nixosSystem { |       tlaternet = self.lib.makeNixosSystem { | ||||||
|         inherit system; |         inherit system; | ||||||
|         specialArgs.flake-inputs = inputs; |         extraModules = [(import ./configuration/hardware-specific/linode)]; | ||||||
| 
 |  | ||||||
|         modules = [ |  | ||||||
|           ./configuration |  | ||||||
|           ./configuration/hardware-specific/linode |  | ||||||
|         ]; |  | ||||||
|       }; |       }; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|  | @ -69,21 +63,19 @@ | ||||||
|     #################### |     #################### | ||||||
|     # Helper functions # |     # Helper functions # | ||||||
|     #################### |     #################### | ||||||
|     lib = import ./lib {inherit (nixpkgs) lib;}; |     lib = import ./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 = nixpkgs.lib.nixosSystem { |       vm = self.lib.makeNixosSystem { | ||||||
|         inherit system; |         inherit system; | ||||||
|         specialArgs.flake-inputs = inputs; |         extraModules = [(import ./configuration/hardware-specific/vm.nix)]; | ||||||
| 
 |  | ||||||
|         modules = [ |  | ||||||
|           ./configuration |  | ||||||
|           ./configuration/hardware-specific/vm.nix |  | ||||||
|         ]; |  | ||||||
|       }; |       }; | ||||||
|     in { |     in { | ||||||
|       default = vm.config.system.build.vm; |       default = vm.config.system.build.vm; | ||||||
|  |  | ||||||
|  | @ -1,4 +1,9 @@ | ||||||
| {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 { | ||||||
|  | @ -7,4 +12,19 @@ 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