a more proper nixos module for the tangled knotserver

Compare changes

Choose any two refs to compare.

Changed files
+99 -39
+96 -30
flake.lock
··· 1 1 { 2 2 "nodes": { 3 - "gitignore": { 3 + "actor-typeahead-src": { 4 + "flake": false, 5 + "locked": { 6 + "lastModified": 1762835797, 7 + "narHash": "sha256-heizoWUKDdar6ymfZTnj3ytcEv/L4d4fzSmtr0HlXsQ=", 8 + "ref": "refs/heads/main", 9 + "rev": "677fe7f743050a4e7f09d4a6f87bbf1325a06f6b", 10 + "revCount": 6, 11 + "type": "git", 12 + "url": "https://tangled.org/@jakelazaroff.com/actor-typeahead" 13 + }, 14 + "original": { 15 + "type": "git", 16 + "url": "https://tangled.org/@jakelazaroff.com/actor-typeahead" 17 + } 18 + }, 19 + "flake-compat": { 20 + "flake": false, 21 + "locked": { 22 + "lastModified": 1751685974, 23 + "narHash": "sha256-NKw96t+BgHIYzHUjkTK95FqYRVKB8DHpVhefWSz/kTw=", 24 + "rev": "549f2762aebeff29a2e5ece7a7dc0f955281a1d1", 25 + "type": "tarball", 26 + "url": "https://git.lix.systems/api/v1/repos/lix-project/flake-compat/archive/549f2762aebeff29a2e5ece7a7dc0f955281a1d1.tar.gz?rev=549f2762aebeff29a2e5ece7a7dc0f955281a1d1" 27 + }, 28 + "original": { 29 + "type": "tarball", 30 + "url": "https://git.lix.systems/lix-project/flake-compat/archive/main.tar.gz" 31 + } 32 + }, 33 + "flake-utils": { 34 + "inputs": { 35 + "systems": "systems" 36 + }, 37 + "locked": { 38 + "lastModified": 1731533236, 39 + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", 40 + "owner": "numtide", 41 + "repo": "flake-utils", 42 + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", 43 + "type": "github" 44 + }, 45 + "original": { 46 + "owner": "numtide", 47 + "repo": "flake-utils", 48 + "type": "github" 49 + } 50 + }, 51 + "gomod2nix": { 4 52 "inputs": { 53 + "flake-utils": "flake-utils", 5 54 "nixpkgs": [ 6 55 "tangledCore", 7 56 "nixpkgs" 8 57 ] 9 58 }, 10 59 "locked": { 11 - "lastModified": 1709087332, 12 - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", 13 - "owner": "hercules-ci", 14 - "repo": "gitignore.nix", 15 - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", 60 + "lastModified": 1763982521, 61 + "narHash": "sha256-ur4QIAHwgFc0vXiaxn5No/FuZicxBr2p0gmT54xZkUQ=", 62 + "owner": "nix-community", 63 + "repo": "gomod2nix", 64 + "rev": "02e63a239d6eabd595db56852535992c898eba72", 16 65 "type": "github" 17 66 }, 18 67 "original": { 19 - "owner": "hercules-ci", 20 - "repo": "gitignore.nix", 68 + "owner": "nix-community", 69 + "repo": "gomod2nix", 21 70 "type": "github" 22 71 } 23 72 }, ··· 36 85 "htmx-ws-src": { 37 86 "flake": false, 38 87 "locked": { 39 - "narHash": "sha256-XbUFiv94ZPB6VVULoTWOsje5Gq1I+IT72lMc4CpUYrY=", 88 + "narHash": "sha256-2fg6KyEJoO24q0fQqbz9RMaYNPQrMwpZh29tkSqdqGY=", 40 89 "type": "file", 41 - "url": "https://unpkg.com/htmx.org@2.0.4/dist/ext/ws.js" 90 + "url": "https://cdn.jsdelivr.net/npm/htmx-ext-ws@2.0.2" 42 91 }, 43 92 "original": { 44 93 "type": "file", 45 - "url": "https://unpkg.com/htmx.org@2.0.4/dist/ext/ws.js" 94 + "url": "https://cdn.jsdelivr.net/npm/htmx-ext-ws@2.0.2" 46 95 } 47 96 }, 48 97 "ibm-plex-mono-src": { ··· 51 100 "lastModified": 1731402384, 52 101 "narHash": "sha256-OwUmrPfEehLDz0fl2ChYLK8FQM2p0G1+EMrGsYEq+6g=", 53 102 "type": "tarball", 54 - "url": "https://github.com/IBM/plex/releases/download/@ibm/plex-mono@1.1.0/ibm-plex-mono.zip" 103 + "url": "https://github.com/IBM/plex/releases/download/@ibm%2Fplex-mono@1.1.0/ibm-plex-mono.zip" 55 104 }, 56 105 "original": { 57 106 "type": "tarball", 58 - "url": "https://github.com/IBM/plex/releases/download/@ibm/plex-mono@1.1.0/ibm-plex-mono.zip" 107 + "url": "https://github.com/IBM/plex/releases/download/@ibm%2Fplex-mono@1.1.0/ibm-plex-mono.zip" 59 108 } 60 109 }, 61 110 "indigo": { 62 111 "flake": false, 63 112 "locked": { 64 - "lastModified": 1745333930, 65 - "narHash": "sha256-83fIHqDE+dfnZ88HaNuwfKFO+R0RKAM1WxMfNh/Matk=", 113 + "lastModified": 1753693716, 114 + "narHash": "sha256-DMIKnCJRODQXEHUxA+7mLzRALmnZhkkbHlFT2rCQYrE=", 66 115 "owner": "oppiliappan", 67 116 "repo": "indigo", 68 - "rev": "e4e59280737b8676611fc077a228d47b3e8e9491", 117 + "rev": "5f170569da9360f57add450a278d73538092d8ca", 69 118 "type": "github" 70 119 }, 71 120 "original": { ··· 90 139 "lucide-src": { 91 140 "flake": false, 92 141 "locked": { 93 - "lastModified": 1742302029, 94 - "narHash": "sha256-OyPVtpnC4/AAmPq84Wt1r1Gcs48d9KG+UBCtZK87e9k=", 142 + "lastModified": 1754044466, 143 + "narHash": "sha256-+exBR2OToB1iv7ZQI2S4B0lXA/QRvC9n6U99UxGpJGs=", 95 144 "type": "tarball", 96 - "url": "https://github.com/lucide-icons/lucide/releases/download/0.483.0/lucide-icons-0.483.0.zip" 145 + "url": "https://github.com/lucide-icons/lucide/releases/download/0.536.0/lucide-icons-0.536.0.zip" 97 146 }, 98 147 "original": { 99 148 "type": "tarball", 100 - "url": "https://github.com/lucide-icons/lucide/releases/download/0.483.0/lucide-icons-0.483.0.zip" 149 + "url": "https://github.com/lucide-icons/lucide/releases/download/0.536.0/lucide-icons-0.536.0.zip" 101 150 } 102 151 }, 103 152 "nixpkgs": { 104 153 "locked": { 105 - "lastModified": 1750506804, 106 - "narHash": "sha256-VLFNc4egNjovYVxDGyBYTrvVCgDYgENp5bVi9fPTDYc=", 154 + "lastModified": 1767640445, 155 + "narHash": "sha256-UWYqmD7JFBEDBHWYcqE6s6c77pWdcU/i+bwD6XxMb8A=", 107 156 "owner": "NixOS", 108 157 "repo": "nixpkgs", 109 - "rev": "4206c4cb56751df534751b058295ea61357bbbaa", 158 + "rev": "9f0c42f8bc7151b8e7e5840fb3bd454ad850d8c5", 110 159 "type": "github" 111 160 }, 112 161 "original": { ··· 135 184 "url": "https://sqlite.org/2024/sqlite-amalgamation-3450100.zip" 136 185 } 137 186 }, 187 + "systems": { 188 + "locked": { 189 + "lastModified": 1681028828, 190 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 191 + "owner": "nix-systems", 192 + "repo": "default", 193 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 194 + "type": "github" 195 + }, 196 + "original": { 197 + "owner": "nix-systems", 198 + "repo": "default", 199 + "type": "github" 200 + } 201 + }, 138 202 "tangledCore": { 139 203 "inputs": { 140 - "gitignore": "gitignore", 204 + "actor-typeahead-src": "actor-typeahead-src", 205 + "flake-compat": "flake-compat", 206 + "gomod2nix": "gomod2nix", 141 207 "htmx-src": "htmx-src", 142 208 "htmx-ws-src": "htmx-ws-src", 143 209 "ibm-plex-mono-src": "ibm-plex-mono-src", ··· 150 216 "sqlite-lib-src": "sqlite-lib-src" 151 217 }, 152 218 "locked": { 153 - "lastModified": 1750580269, 154 - "narHash": "sha256-Y8WCUQYknbPPBN2nKCnL2B7rqFpIJxZ9dGB8ahmPPnA=", 219 + "lastModified": 1767767073, 220 + "narHash": "sha256-BSZJ1TY5lGt7xNgFRtcKwYcSOI6VC2CHLfm7y/GgHwU=", 155 221 "ref": "refs/heads/master", 156 - "rev": "fa3beeb9d299bbcf86440e77899773506e654e29", 157 - "revCount": 861, 222 + "rev": "6dc86ffbed5a290ca6a4890caa2dadea5c8b8a81", 223 + "revCount": 1792, 158 224 "type": "git", 159 - "url": "https://tangled.sh/@tangled.sh/core" 225 + "url": "https://tangled.org/tangled.org/core" 160 226 }, 161 227 "original": { 162 228 "type": "git", 163 - "url": "https://tangled.sh/@tangled.sh/core" 229 + "url": "https://tangled.org/tangled.org/core" 164 230 } 165 231 } 166 232 },
+1 -1
flake.nix
··· 4 4 inputs = { 5 5 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # needed for easy overriding... and tests 6 6 tangledCore = { 7 - url = "git+https://tangled.sh/@tangled.sh/core"; 7 + url = "git+https://tangled.org/tangled.org/core"; 8 8 9 9 inputs = { 10 10 # upstream pinned stuff like git repos not included because lockfile already stores rev
+2 -8
module.nix
··· 125 125 default = { }; 126 126 example = lib.literalExpression '' 127 127 { 128 - # this is only an example, do NOT do this! your secret will end up readable by *everyone*! 129 - KNOT_SERVER_SECRET = "verysecuresecret"; 128 + KNOT_SERVER_OWNER = "did:web:handle.invalid"; 130 129 } 131 130 ''; 132 131 description = '' 133 132 Additional environment variables. Use `environmentFile` for secrets. 134 133 135 - `KNOT_SERVER_SECRET` must be set for the knotserver to work, and can be obtained from 136 - [this page](https://tangled.sh/knots). Please set this with environmentFile instead of setting it here 137 - directly. 134 + `KNOT_SERVER_OWNER` must be set for the program to work correctly. 138 135 ''; 139 136 }; 140 137 ··· 155 152 example = "/etc/tangled/knotserver.env"; 156 153 description = '' 157 154 Environment file to set additional configuration and secrets for the knotserver. 158 - 159 - `KNOT_SERVER_SECRET` must be set for the knotserver to work, and can be obtained from 160 - [this page](https://tangled.sh/knots). 161 155 ''; 162 156 }; 163 157 };