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