Tangled infrastructure definitions in Nix

setup docs.tangled.org

Signed-off-by: oppiliappan <me@oppi.li>

oppi.li 8084b3ea ab05039a

verified
Changed files
+25 -13
hosts
nixery
services
+13 -13
flake.lock
··· 108 "systems": "systems" 109 }, 110 "locked": { 111 - "lastModified": 1694529238, 112 - "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", 113 "owner": "numtide", 114 "repo": "flake-utils", 115 - "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", 116 "type": "github" 117 }, 118 "original": { ··· 130 ] 131 }, 132 "locked": { 133 - "lastModified": 1754078208, 134 - "narHash": "sha256-YVoIFDCDpYuU3riaDEJ3xiGdPOtsx4sR5eTzHTytPV8=", 135 "owner": "nix-community", 136 "repo": "gomod2nix", 137 - "rev": "7f963246a71626c7fc70b431a315c4388a0c95cf", 138 "type": "github" 139 }, 140 "original": { ··· 272 }, 273 "nixpkgs_3": { 274 "locked": { 275 - "lastModified": 1751984180, 276 - "narHash": "sha256-LwWRsENAZJKUdD3SpLluwDmdXY9F45ZEgCb0X+xgOL0=", 277 "owner": "nixos", 278 "repo": "nixpkgs", 279 - "rev": "9807714d6944a957c2e036f84b0ff8caf9930bc0", 280 "type": "github" 281 }, 282 "original": { ··· 354 "sqlite-lib-src": "sqlite-lib-src" 355 }, 356 "locked": { 357 - "lastModified": 1763358301, 358 - "narHash": "sha256-i2fc5A2qoHvubTWhcpG5S6Hy42DlYOyEgJjR6TaQvxg=", 359 "ref": "refs/heads/master", 360 - "rev": "a17d65a1a78d8889e0b971be2bc5d32be445ce10", 361 - "revCount": 1666, 362 "type": "git", 363 "url": "https://tangled.org/@tangled.org/core" 364 },
··· 108 "systems": "systems" 109 }, 110 "locked": { 111 + "lastModified": 1731533236, 112 + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", 113 "owner": "numtide", 114 "repo": "flake-utils", 115 + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", 116 "type": "github" 117 }, 118 "original": { ··· 130 ] 131 }, 132 "locked": { 133 + "lastModified": 1763982521, 134 + "narHash": "sha256-ur4QIAHwgFc0vXiaxn5No/FuZicxBr2p0gmT54xZkUQ=", 135 "owner": "nix-community", 136 "repo": "gomod2nix", 137 + "rev": "02e63a239d6eabd595db56852535992c898eba72", 138 "type": "github" 139 }, 140 "original": { ··· 272 }, 273 "nixpkgs_3": { 274 "locked": { 275 + "lastModified": 1766070988, 276 + "narHash": "sha256-G/WVghka6c4bAzMhTwT2vjLccg/awmHkdKSd2JrycLc=", 277 "owner": "nixos", 278 "repo": "nixpkgs", 279 + "rev": "c6245e83d836d0433170a16eb185cefe0572f8b8", 280 "type": "github" 281 }, 282 "original": { ··· 354 "sqlite-lib-src": "sqlite-lib-src" 355 }, 356 "locked": { 357 + "lastModified": 1766504962, 358 + "narHash": "sha256-is2yCWdVQ0S5NY893TfTVFgBUpWkh8SFZd0yy+gsjAU=", 359 "ref": "refs/heads/master", 360 + "rev": "3596ea2d0f5aba3f13ccf92ceb2560b7fa581364", 361 + "revCount": 1775, 362 "type": "git", 363 "url": "https://tangled.org/@tangled.org/core" 364 },
+1
flake.nix
··· 42 nixery-pkgs = import nixery-flake.outPath { 43 pkgs = import nixpkgs { system = "x86_64-linux"; }; 44 }; 45 commonArgs = import ./common/ssh.nix; 46 }; 47 };
··· 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 };
+11
hosts/nixery/services/nginx.nix
··· 1 { 2 services.nginx = { 3 enable = true; 4 virtualHosts = { 5 "nixery.tangled.sh" = { 6 forceSSL = true; 7 enableACME = true;
··· 1 + { tangled-pkgs, pkgs, ... }: 2 + 3 { 4 services.nginx = { 5 enable = true; 6 virtualHosts = { 7 + "docs.tangled.org" = { 8 + forceSSL = true; 9 + enableACME = true; 10 + root = "${tangled-pkgs.docs}"; 11 + locations."/" = { 12 + tryFiles = "$uri $uri/ =404"; 13 + index = "index.html"; 14 + }; 15 + }; 16 "nixery.tangled.sh" = { 17 forceSSL = true; 18 enableACME = true;