All my system configs and packages in one repo

focaccia: add caddy & tangled knot services

pluie.me 20de562e fe7cc290

verified
+185 -3
+133 -1
flake.lock
··· 22 22 "type": "github" 23 23 } 24 24 }, 25 + "empty": { 26 + "locked": { 27 + "lastModified": 1759502707, 28 + "narHash": "sha256-ML60zVlqK+R0R6EH2aWhWJh9CYPj2XuaRya9AuMl/GY=", 29 + "owner": "MidAutumnMoon", 30 + "repo": "empty-flake", 31 + "rev": "3b830d637cf569096d7442e57fd221ecb887feda", 32 + "type": "github" 33 + }, 34 + "original": { 35 + "owner": "MidAutumnMoon", 36 + "repo": "empty-flake", 37 + "type": "github" 38 + } 39 + }, 25 40 "flake-compat": { 26 41 "flake": false, 27 42 "locked": { ··· 125 140 "type": "github" 126 141 } 127 142 }, 143 + "flake-utils_2": { 144 + "inputs": { 145 + "systems": "systems_5" 146 + }, 147 + "locked": { 148 + "lastModified": 1731533236, 149 + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", 150 + "owner": "numtide", 151 + "repo": "flake-utils", 152 + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", 153 + "type": "github" 154 + }, 155 + "original": { 156 + "owner": "numtide", 157 + "repo": "flake-utils", 158 + "type": "github" 159 + } 160 + }, 128 161 "ghostty": { 129 162 "inputs": { 130 163 "flake-compat": "flake-compat_2", ··· 151 184 "type": "github" 152 185 } 153 186 }, 187 + "gomod2nix": { 188 + "inputs": { 189 + "flake-utils": "flake-utils_2", 190 + "nixpkgs": [ 191 + "tangled", 192 + "nixpkgs" 193 + ] 194 + }, 195 + "locked": { 196 + "lastModified": 1763982521, 197 + "narHash": "sha256-ur4QIAHwgFc0vXiaxn5No/FuZicxBr2p0gmT54xZkUQ=", 198 + "owner": "nix-community", 199 + "repo": "gomod2nix", 200 + "rev": "02e63a239d6eabd595db56852535992c898eba72", 201 + "type": "github" 202 + }, 203 + "original": { 204 + "owner": "nix-community", 205 + "repo": "gomod2nix", 206 + "type": "github" 207 + } 208 + }, 154 209 "hjem": { 155 210 "inputs": { 156 211 "ndg": "ndg", ··· 401 456 "root": { 402 457 "inputs": { 403 458 "deploy-rs": "deploy-rs", 459 + "empty": "empty", 404 460 "flake-parts": "flake-parts", 405 461 "ghostty": "ghostty", 406 462 "hjem": "hjem", ··· 408 464 "nix-index-database": "nix-index-database", 409 465 "nixos-generators": "nixos-generators", 410 466 "nixos-hardware": "nixos-hardware", 411 - "nixpkgs": "nixpkgs_2" 467 + "nixpkgs": "nixpkgs_2", 468 + "tangled": "tangled" 412 469 } 413 470 }, 414 471 "rust-overlay": { ··· 503 560 "type": "github" 504 561 } 505 562 }, 563 + "sqlite-lib-src": { 564 + "flake": false, 565 + "locked": { 566 + "lastModified": 1706631843, 567 + "narHash": "sha256-bJoMjirsBjm2Qk9KPiy3yV3+8b/POlYe76/FQbciHro=", 568 + "type": "tarball", 569 + "url": "https://sqlite.org/2024/sqlite-amalgamation-3450100.zip" 570 + }, 571 + "original": { 572 + "type": "tarball", 573 + "url": "https://sqlite.org/2024/sqlite-amalgamation-3450100.zip" 574 + } 575 + }, 506 576 "systems": { 507 577 "locked": { 508 578 "lastModified": 1681028828, ··· 561 631 "owner": "nix-systems", 562 632 "repo": "default", 563 633 "type": "github" 634 + } 635 + }, 636 + "systems_5": { 637 + "locked": { 638 + "lastModified": 1681028828, 639 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 640 + "owner": "nix-systems", 641 + "repo": "default", 642 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 643 + "type": "github" 644 + }, 645 + "original": { 646 + "owner": "nix-systems", 647 + "repo": "default", 648 + "type": "github" 649 + } 650 + }, 651 + "tangled": { 652 + "inputs": { 653 + "actor-typeahead-src": [ 654 + "empty" 655 + ], 656 + "flake-compat": [ 657 + "empty" 658 + ], 659 + "gomod2nix": "gomod2nix", 660 + "htmx-src": [ 661 + "empty" 662 + ], 663 + "htmx-ws-src": [ 664 + "empty" 665 + ], 666 + "ibm-plex-mono-src": [ 667 + "empty" 668 + ], 669 + "indigo": [ 670 + "empty" 671 + ], 672 + "inter-fonts-src": [ 673 + "empty" 674 + ], 675 + "lucide-src": [ 676 + "empty" 677 + ], 678 + "nixpkgs": [ 679 + "nixpkgs" 680 + ], 681 + "sqlite-lib-src": "sqlite-lib-src" 682 + }, 683 + "locked": { 684 + "lastModified": 1768561232, 685 + "narHash": "sha256-LcsRiuLkT4vof4prMOxR8TCEkAL5XU8yAkJeRoBKX8A=", 686 + "ref": "refs/heads/master", 687 + "rev": "2403bf5e0aba49b48e8384467b31ed84268196ae", 688 + "shallow": true, 689 + "type": "git", 690 + "url": "https://tangled.org/tangled.org/core" 691 + }, 692 + "original": { 693 + "shallow": true, 694 + "type": "git", 695 + "url": "https://tangled.org/tangled.org/core" 564 696 } 565 697 }, 566 698 "treefmt-nix": {
+18
flake.nix
··· 12 12 13 13 inputs = { 14 14 nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; 15 + empty.url = "github:MidAutumnMoon/empty-flake"; 15 16 16 17 # NOTE: please keep this in alphabetical order. 17 18 ··· 50 51 nixos-generators = { 51 52 url = "github:nix-community/nixos-generators"; 52 53 inputs.nixpkgs.follows = "nixpkgs"; 54 + }; 55 + 56 + tangled = { 57 + url = "git+https://tangled.org/tangled.org/core?shallow=1"; 58 + inputs = { 59 + nixpkgs.follows = "nixpkgs"; 60 + 61 + # We don't need any of these 62 + flake-compat.follows = "empty"; 63 + indigo.follows = "empty"; 64 + htmx-src.follows = "empty"; 65 + htmx-ws-src.follows = "empty"; 66 + lucide-src.follows = "empty"; 67 + inter-fonts-src.follows = "empty"; 68 + actor-typeahead-src.follows = "empty"; 69 + ibm-plex-mono-src.follows = "empty"; 70 + }; 53 71 }; 54 72 }; 55 73
+30 -1
systems/focaccia/configuration.nix
··· 1 + { 2 + inputs, 3 + ... 4 + }: 1 5 { 2 6 imports = [ 3 7 ../common.nix 4 8 ./hardware-configuration.nix 5 9 ./networking.nix 6 10 ../../modules/nixos/hysteria.nix 11 + inputs.tangled.nixosModules.knot 7 12 ]; 8 13 9 14 networking = { ··· 44 49 }; 45 50 46 51 users.users.root.openssh.authorizedKeys.keys = [ 47 - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbsavGX9rGRx5R+7ovLn+r7D/w3zkbqCik4bS31moSz'' 52 + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbsavGX9rGRx5R+7ovLn+r7D/w3zkbqCik4bS31moSz" 48 53 ]; 49 54 50 55 boot.kernel.sysctl = { ··· 71 76 rewriteHost = true; 72 77 }; 73 78 }; 79 + }; 80 + }; 81 + 82 + # Reverse proxy 83 + services.caddy = { 84 + enable = true; 85 + email = "srv@acc.pluie.me"; 86 + virtualHosts."focaccia.pluie.me" = { 87 + extraConfig = '' 88 + reverse_proxy :8964 89 + ''; 90 + }; 91 + }; 92 + 93 + services.tangled.knot = { 94 + enable = true; 95 + openFirewall = false; 96 + 97 + stateDir = "/var/lib/tangled-knot"; 98 + server = { 99 + listenAddr = "0.0.0.0:8964"; 100 + internalListenAddr = "127.0.0.1:4698"; 101 + owner = "did:plc:e4f33w5yt2m54tq6vsagpwiu"; 102 + hostname = "focaccia.pluie.me"; 74 103 }; 75 104 }; 76 105 }
+4 -1
systems/laptop.nix
··· 122 122 123 123 # Redirect all traffic through proxy 124 124 networking.proxy.allProxy = "http://127.0.0.1:2080"; 125 - nix.settings.impure-env = [ "all_proxy=http://127.0.0.1:2080" ]; 125 + nix.settings.impure-env = [ 126 + "all_proxy=http://127.0.0.1:2080" 127 + "GOPROXY=https://goproxy.cn" 128 + ]; 126 129 127 130 # Make the auto upgrade mechanism upgrade to the correct specialization 128 131 # so that proxies don't just randomly break the next day