Tangled infrastructure definitions in Nix
1{ 2 description = "nix infra for tangled"; 3 inputs = { 4 nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; 5 tangled.url = "git+https://tangled.org/@tangled.org/core"; 6 colmena.url = "github:zhaofengli/colmena/release-0.4.x"; 7 disko = { 8 url = "github:nix-community/disko"; 9 inputs.nixpkgs.follows = "nixpkgs"; 10 }; 11 nixery-flake = { 12 type = "github"; 13 owner = "tazjin"; 14 repo = "nixery"; 15 flake = false; 16 }; 17 }; 18 19 outputs = 20 { nixpkgs, disko, colmena, nixery-flake, tangled, ... }: 21 { 22 nixosConfigurations.nixery = nixpkgs.lib.nixosSystem { 23 system = "x86_64-linux"; 24 modules = [ 25 disko.nixosModules.disko 26 tangled.nixosModules.spindle 27 ./hosts/nixery/configuration.nix 28 ]; 29 }; 30 nixosConfigurations.pds = nixpkgs.lib.nixosSystem { 31 system = "x86_64-linux"; 32 modules = [ 33 disko.nixosModules.disko 34 ./hosts/pds/configuration.nix 35 ]; 36 }; 37 38 colmenaHive = colmena.lib.makeHive { 39 meta = { 40 nixpkgs = nixpkgs.legacyPackages.x86_64-linux; 41 specialArgs = { 42 nixery-pkgs = import nixery-flake.outPath { 43 pkgs = import nixpkgs { system = "x86_64-linux"; }; 44 }; 45 tangled-pkgs = tangled.packages.x86_64-linux; 46 commonArgs = import ./common/ssh.nix; 47 }; 48 }; 49 50 defaults = { pkgs, ... }: { 51 environment.systemPackages = [ 52 pkgs.curl 53 ]; 54 }; 55 pds = { pkgs, ... }: { 56 deployment = { 57 targetHost = "tngl.sh"; 58 targetPort = 22; 59 targetUser = "tangler"; 60 buildOnTarget = true; 61 }; 62 nixpkgs.system = "x86_64-linux"; 63 64 imports = [ 65 disko.nixosModules.disko 66 ./hosts/pds/configuration.nix 67 ./hosts/pds/services/nginx.nix 68 ./hosts/pds/services/pds.nix 69 ]; 70 time.timeZone = "Europe/Helsinki"; 71 }; 72 73 nixery = { pkgs, ... }: { 74 deployment = { 75 targetHost = "nixery.tangled.sh"; 76 targetPort = 22; 77 targetUser = "tangler"; 78 buildOnTarget = true; 79 }; 80 nixpkgs.system = "x86_64-linux"; 81 82 imports = [ 83 disko.nixosModules.disko 84 tangled.nixosModules.spindle 85 ./hosts/nixery/configuration.nix 86 ./hosts/nixery/services/nginx.nix 87 ./hosts/nixery/services/openbao/openbao.nix 88 ./hosts/nixery/services/openbao/proxy.nix 89 ./hosts/nixery/services/nixery.nix 90 ]; 91 time.timeZone = "Europe/Helsinki"; 92 }; 93 }; 94 }; 95}