diff options
| author | vin <vin@vineetk.net> | 2025-03-03 19:54:56 -0500 |
|---|---|---|
| committer | vin <vin@vineetk.net> | 2025-03-03 19:54:56 -0500 |
| commit | 5f5006198491e42fc3a81c7647d1a648a5f1932e (patch) | |
| tree | 021ca0a6a420c5ec51a3e07ecd269827142961bc | |
| parent | c83b940c15f2d2a2ed6b44d23b4332182ec41ff1 (diff) | |
demiurge: switch back to using self-signed cert instead of step-ca
step-ca was being a massive pain when I switched the domain from
demiurge.vpn to demiurge.epistemia. After a long time of trying to see
why it couldn't connect, it later switched to rejectedIdentifier and I
had no idea how to fix it. (one of the github issues on it had
maintainer saying they're closing due to being unable to reproduce)
| -rw-r--r-- | home.nix | 22 | ||||
| -rw-r--r-- | hosts/demiurge/default.nix | 107 | ||||
| -rw-r--r-- | hosts/saklas/default.nix | 10 | ||||
| -rw-r--r-- | secrets/secrets.nix | 1 | ||||
| -rw-r--r-- | secrets/smallstep.age | bin | 465 -> 0 bytes |
5 files changed, 51 insertions, 89 deletions
| @@ -432,7 +432,7 @@ in { | |||
| 432 | }; | 432 | }; |
| 433 | 433 | ||
| 434 | searchEngines = { | 434 | searchEngines = { |
| 435 | DEFAULT = "https://searx.demiurge.vpn/search?q={}"; | 435 | DEFAULT = "https://searx.demiurge.epistemia/search?q={}"; |
| 436 | ddg = "https://lite.duckduckgo.com/?q={}"; | 436 | ddg = "https://lite.duckduckgo.com/?q={}"; |
| 437 | nw = "https://wiki.nixos.org/index.php?search={}"; | 437 | nw = "https://wiki.nixos.org/index.php?search={}"; |
| 438 | aw = "https://wiki.archlinux.org/?search={}"; | 438 | aw = "https://wiki.archlinux.org/?search={}"; |
| @@ -481,7 +481,7 @@ config.set('content.javascript.enabled', True, 'cloud.binary.ninja') | |||
| 481 | config.set('content.javascript.enabled', True, 'console.hetzner.cloud') | 481 | config.set('content.javascript.enabled', True, 'console.hetzner.cloud') |
| 482 | config.set('content.javascript.enabled', True, '*.hetzner.com') | 482 | config.set('content.javascript.enabled', True, '*.hetzner.com') |
| 483 | config.set('content.javascript.enabled', True, '*.digikey.com') | 483 | config.set('content.javascript.enabled', True, '*.digikey.com') |
| 484 | config.set('content.javascript.enabled', True, '*.demiurge.vpn') | 484 | config.set('content.javascript.enabled', True, '*.demiurge.epistemia') |
| 485 | 485 | ||
| 486 | # Allow locally loaded documents to access remote URLs. | 486 | # Allow locally loaded documents to access remote URLs. |
| 487 | config.set('content.local_content_can_access_remote_urls', True, 'file:///home/vin/.local/share/qutebrowser/userscripts/*') | 487 | config.set('content.local_content_can_access_remote_urls', True, 'file:///home/vin/.local/share/qutebrowser/userscripts/*') |
| @@ -884,15 +884,15 @@ def _pastebin_redir(url: QUrl) -> bool: | |||
| 884 | 884 | ||
| 885 | # Any return value other than a literal 'False' means we redirected | 885 | # Any return value other than a literal 'False' means we redirected |
| 886 | REDIRECT_MAP = { | 886 | REDIRECT_MAP = { |
| 887 | "new.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.vpn'), | 887 | "new.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'), |
| 888 | "np.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.vpn'), | 888 | "np.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'), |
| 889 | "old.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.vpn'), | 889 | "old.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'), |
| 890 | "reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.vpn'), | 890 | "reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'), |
| 891 | "www.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.vpn'), | 891 | "www.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'), |
| 892 | 892 | ||
| 893 | "www.youtube.com": operator.methodcaller('setHost', 'invidious.demiurge.vpn'), | 893 | "www.youtube.com": operator.methodcaller('setHost', 'invidious.demiurge.epistemia'), |
| 894 | "youtube.com": operator.methodcaller('setHost', 'invidious.demiurge.vpn'), | 894 | "youtube.com": operator.methodcaller('setHost', 'invidious.demiurge.epistemia'), |
| 895 | "youtu.be": operator.methodcaller('setHost', 'invidious.demiurge.vpn'), | 895 | "youtu.be": operator.methodcaller('setHost', 'invidious.demiurge.epistemia'), |
| 896 | 896 | ||
| 897 | "imgur.com": operator.methodcaller('setHost', 'rimgo.bloat.cat'), | 897 | "imgur.com": operator.methodcaller('setHost', 'rimgo.bloat.cat'), |
| 898 | "i.imgur.com": operator.methodcaller('setHost', 'rimgo.bloat.cat'), | 898 | "i.imgur.com": operator.methodcaller('setHost', 'rimgo.bloat.cat'), |
diff --git a/hosts/demiurge/default.nix b/hosts/demiurge/default.nix index 1189a02..52756f1 100644 --- a/hosts/demiurge/default.nix +++ b/hosts/demiurge/default.nix | |||
| @@ -14,12 +14,6 @@ | |||
| 14 | owner = "root"; | 14 | owner = "root"; |
| 15 | group = "root"; | 15 | group = "root"; |
| 16 | }; | 16 | }; |
| 17 | |||
| 18 | smallstep = { | ||
| 19 | file = ../../secrets/smallstep.age; | ||
| 20 | owner = "step-ca"; | ||
| 21 | group = "step-ca"; | ||
| 22 | }; | ||
| 23 | }; | 17 | }; |
| 24 | 18 | ||
| 25 | # boot options | 19 | # boot options |
| @@ -187,12 +181,6 @@ | |||
| 187 | # }; | 181 | # }; |
| 188 | 182 | ||
| 189 | security = { | 183 | security = { |
| 190 | acme = { | ||
| 191 | acceptTerms = true; | ||
| 192 | defaults.email = "me@vineetk.net"; | ||
| 193 | defaults.server = "https://127.0.0.1:4433/acme/acme/directory"; | ||
| 194 | }; | ||
| 195 | |||
| 196 | # I prefer doas over sudo for simplicity | 184 | # I prefer doas over sudo for simplicity |
| 197 | doas = { | 185 | doas = { |
| 198 | enable = true; | 186 | enable = true; |
| @@ -206,15 +194,24 @@ | |||
| 206 | pki.certificates = [ | 194 | pki.certificates = [ |
| 207 | '' | 195 | '' |
| 208 | -----BEGIN CERTIFICATE----- | 196 | -----BEGIN CERTIFICATE----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3RNslQHymr4Wl6+lL6V6XfuB1taECJYSLXPx66TvJqod2Io+b7T7cWp+9g9U |
| 217 | LQIhANgsvYmyCp/Nur2RKaV25CDg3kMYVBXED2HVDy8qa+3i | 205 | B2jQu1YnPRpwjdPvbOCPjPbOP6UcbyHdbHAidSM0FSL5riVUmugwDwbQKXFFX2gH |
| 206 | hwIDAQABo2gwZjAfBgNVHREEGDAWghQqLmRlbWl1cmdlLmVwaXN0ZW1pYTATBgNV | ||
| 207 | HSUEDDAKBggrBgEFBQcDATAPBgNVHRMECDAGAQH/AgEAMB0GA1UdDgQWBBTjMVhw | ||
| 208 | zmkE6P5jFHkLVQE2gNB2ejANBgkqhkiG9w0BAQsFAAOCAQEAWvnwB83vXzQFpObF | ||
| 209 | vn/nfZ9wYpNaBsE15ab3Fwd2nDc55KDkDWgBi5Xl8fwN3OhFOU2XXBCYqbCU6asx | ||
| 210 | OnSx9glbhJioORO7B5ENbEYrpB97SaWASNXrBQ2KiQT5aC+9xb52K53kkk0tTn2l | ||
| 211 | nBb+jyLItzWX99H6EavOq69a4T2BObZaSPQAfpM8FIrKl+UZC3152+bi8wKfG4K4 | ||
| 212 | FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | ||
| 213 | /ek8Rmf6DTLaFBx+raWyDTgMY23lvWTKDTT1+dZnRNcg72bFpIdqHsDrIg/IBjZ0 | ||
| 214 | 3eGfkQ== | ||
| 218 | -----END CERTIFICATE----- | 215 | -----END CERTIFICATE----- |
| 219 | '' | 216 | '' |
| 220 | ]; | 217 | ]; |
| @@ -271,7 +268,7 @@ LQIhANgsvYmyCp/Nur2RKaV25CDg3kMYVBXED2HVDy8qa+3i | |||
| 271 | nginx = { | 268 | nginx = { |
| 272 | enable = true; | 269 | enable = true; |
| 273 | 270 | ||
| 274 | defaultListenAddresses = [ "10.0.13.2" ]; | 271 | defaultListenAddresses = [ "100.64.0.5" ]; |
| 275 | 272 | ||
| 276 | recommendedGzipSettings = true; | 273 | recommendedGzipSettings = true; |
| 277 | recommendedOptimisation = true; | 274 | recommendedOptimisation = true; |
| @@ -280,26 +277,30 @@ LQIhANgsvYmyCp/Nur2RKaV25CDg3kMYVBXED2HVDy8qa+3i | |||
| 280 | 277 | ||
| 281 | virtualHosts = { | 278 | virtualHosts = { |
| 282 | "searx.demiurge.epistemia" = { | 279 | "searx.demiurge.epistemia" = { |
| 283 | enableACME = true; | 280 | addSSL = true; |
| 284 | forceSSL = false; | 281 | sslCertificate = "/var/demiurge.epistemia.crt"; |
| 282 | sslCertificateKey = "/var/demiurge.epistemia.key"; | ||
| 285 | locations."/".proxyPass = "http://127.0.0.1:8081"; | 283 | locations."/".proxyPass = "http://127.0.0.1:8081"; |
| 286 | }; | 284 | }; |
| 287 | 285 | ||
| 288 | "redlib.demiurge.epistemia" = { | 286 | "redlib.demiurge.epistemia" = { |
| 289 | enableACME = true; | 287 | addSSL = true; |
| 290 | forceSSL = false; | 288 | sslCertificate = "/var/demiurge.epistemia.crt"; |
| 289 | sslCertificateKey = "/var/demiurge.epistemia.key"; | ||
| 291 | locations."/".proxyPass = "http://127.0.0.1:8082"; | 290 | locations."/".proxyPass = "http://127.0.0.1:8082"; |
| 292 | }; | 291 | }; |
| 293 | 292 | ||
| 294 | "navidrome.demiurge.epistemia" = { | 293 | "navidrome.demiurge.epistemia" = { |
| 295 | enableACME = true; | 294 | addSSL = true; |
| 296 | forceSSL = false; | 295 | sslCertificate = "/var/demiurge.epistemia.crt"; |
| 296 | sslCertificateKey = "/var/demiurge.epistemia.key"; | ||
| 297 | locations."/".proxyPass = "http://127.0.0.1:4533"; | 297 | locations."/".proxyPass = "http://127.0.0.1:4533"; |
| 298 | }; | 298 | }; |
| 299 | 299 | ||
| 300 | "sdui.demiurge.epistemia" = { | 300 | "sdui.demiurge.epistemia" = { |
| 301 | enableACME = true; | 301 | addSSL = true; |
| 302 | forceSSL = false; | 302 | sslCertificate = "/var/demiurge.epistemia.crt"; |
| 303 | sslCertificateKey = "/var/demiurge.epistemia.key"; | ||
| 303 | locations."/" = { | 304 | locations."/" = { |
| 304 | proxyPass = "http://127.0.0.1:7860"; | 305 | proxyPass = "http://127.0.0.1:7860"; |
| 305 | proxyWebsockets = true; | 306 | proxyWebsockets = true; |
| @@ -770,52 +771,6 @@ LQIhANgsvYmyCp/Nur2RKaV25CDg3kMYVBXED2HVDy8qa+3i | |||
| 770 | }; | 771 | }; |
| 771 | }; | 772 | }; |
| 772 | 773 | ||
| 773 | # certificate authority | ||
| 774 | step-ca = { | ||
| 775 | enable = true; | ||
| 776 | address = "127.0.0.1"; | ||
| 777 | port = 4433; | ||
| 778 | intermediatePasswordFile = config.age.secrets.smallstep.path; | ||
| 779 | |||
| 780 | settings = { | ||
| 781 | root = "/var/lib/step-ca/certs/root_ca.crt"; | ||
| 782 | federatedRoots = null; | ||
| 783 | crt = "/var/lib/step-ca/certs/intermediate_ca.crt"; | ||
| 784 | key = "/var/lib/step-ca/secrets/intermediate_ca_key"; | ||
| 785 | address = "127.0.0.1:4433"; | ||
| 786 | insecureAddress = ""; | ||
| 787 | dnsNames = [ "127.0.0.1" ]; | ||
| 788 | logger.format = "text"; | ||
| 789 | |||
| 790 | db = { | ||
| 791 | type = "badgerv2"; | ||
| 792 | dataSource = "/var/lib/step-ca/db"; | ||
| 793 | badgerFileLoadingmode = ""; | ||
| 794 | }; | ||
| 795 | |||
| 796 | authority.provisioners = [{ | ||
| 797 | type = "ACME"; | ||
| 798 | name = "acme"; | ||
| 799 | claims = { | ||
| 800 | enableSSHCA = true; | ||
| 801 | disableRenewal = false; | ||
| 802 | allowRenewalAfterExpiry = false; | ||
| 803 | disableSmallstepExtensions = false; | ||
| 804 | }; | ||
| 805 | }]; | ||
| 806 | |||
| 807 | tls = { | ||
| 808 | cipherSuites = [ | ||
| 809 | "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256" | ||
| 810 | "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" | ||
| 811 | ]; | ||
| 812 | minVersion = 1.2; | ||
| 813 | maxVersion = 1.3; | ||
| 814 | renegotiation = false; | ||
| 815 | }; | ||
| 816 | }; | ||
| 817 | }; | ||
| 818 | |||
| 819 | # vpn | 774 | # vpn |
| 820 | tailscale = { | 775 | tailscale = { |
| 821 | enable = true; | 776 | enable = true; |
diff --git a/hosts/saklas/default.nix b/hosts/saklas/default.nix index 2c1a2b8..e8a79f6 100644 --- a/hosts/saklas/default.nix +++ b/hosts/saklas/default.nix | |||
| @@ -155,7 +155,15 @@ | |||
| 155 | port = 8080; | 155 | port = 8080; |
| 156 | settings = { | 156 | settings = { |
| 157 | server_url = "https://headscale.13f0.net"; | 157 | server_url = "https://headscale.13f0.net"; |
| 158 | dns.base_domain = "epistemia"; | 158 | dns = { |
| 159 | base_domain = "epistemia"; | ||
| 160 | extra_records = [ | ||
| 161 | { name = "navidrome.demiurge.epistemia"; type = "A"; value = "100.64.0.5"; } | ||
| 162 | { name = "redlib.demiurge.epistemia"; type = "A"; value = "100.64.0.5"; } | ||
| 163 | { name = "sdui.demiurge.epistemia"; type = "A"; value = "100.64.0.5"; } | ||
| 164 | { name = "searx.demiurge.epistemia"; type = "A"; value = "100.64.0.5"; } | ||
| 165 | ]; | ||
| 166 | }; | ||
| 159 | logtail.enabled = false; | 167 | logtail.enabled = false; |
| 160 | }; | 168 | }; |
| 161 | }; | 169 | }; |
diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 69036d5..e42d9d5 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix | |||
| @@ -13,7 +13,6 @@ in | |||
| 13 | 13 | ||
| 14 | "hetzner_dns.age".publicKeys = users ++ [ saklas ]; | 14 | "hetzner_dns.age".publicKeys = users ++ [ saklas ]; |
| 15 | "radicale_users.age".publicKeys = users ++ [ saklas ]; | 15 | "radicale_users.age".publicKeys = users ++ [ saklas ]; |
| 16 | "smallstep.age".publicKeys = users ++ [ demiurge ]; | ||
| 17 | "tailscale_demiurge.age".publicKeys = users ++ [ demiurge ]; | 16 | "tailscale_demiurge.age".publicKeys = users ++ [ demiurge ]; |
| 18 | "tailscale_saklas.age".publicKeys = users ++ [ saklas ]; | 17 | "tailscale_saklas.age".publicKeys = users ++ [ saklas ]; |
| 19 | } | 18 | } |
diff --git a/secrets/smallstep.age b/secrets/smallstep.age deleted file mode 100644 index 842bd86..0000000 --- a/secrets/smallstep.age +++ /dev/null | |||
| Binary files differ | |||
