diff --git a/README.md b/README.md index 2539468..49bfa08 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,13 @@ Easing the deployment of Radicle seed nodes with the magic of Nix 🌱 ➕ ❄ ## Deployment -Then to deploy to the target, for example `seed.radicle.xyz`, use the following +Then to deploy to the target, for example `seed.radicle.dev`, use the following command. You might have to adjust the value of `$USER` if the username on your local machine does not match the username of your account on the target machine. Also, note that you may have to get permission to be added as a user first: ``` -HOST=seed.radicle.xyz; nixos-rebuild switch --target-host "${USER}@${HOST}" --build-host "${USER}@${HOST}" --use-remote-sudo --flake . +HOST=seed.radicle.dev; nixos-rebuild switch --target-host "${USER}@${HOST}" --build-host "${USER}@${HOST}" --use-remote-sudo --flake . ``` ### Overlays @@ -32,7 +32,7 @@ Then the following option should be changed in `os/mixin/radicle.nix`: ## DNS -The radicle.xyz. zone is configured via [DNSControl]. +The `radicle.{community,dev,network,xyz}` zones are configured via [DNSControl]. Previewing and pushing changes requires a [Cloudflare API Token] in the environment at `CLOUDFLARE_API_TOKEN`. In `/dns`: diff --git a/dns/dnsconfig.js b/dns/dnsconfig.js index 8b6e3cc..4adf21b 100644 --- a/dns/dnsconfig.js +++ b/dns/dnsconfig.js @@ -15,9 +15,6 @@ D("radicle.xyz", REG_NONE, DnsProvider(DSP_CLOUDFLARE), CNAME("toot", "vip.masto.host."), - TXT("_atproto", "\"did=did:plc:h3rhdktoagtwfu452cjyw3df\""), - - // Migadu MX("@", 10, "aspmx1.migadu.com."), MX("@", 20, "aspmx2.migadu.com."), @@ -37,6 +34,12 @@ D("radicle.xyz", REG_NONE, DnsProvider(DSP_CLOUDFLARE), // Google Search Console TXT("@", "\"google-site-verification=UkriKVl03GNNPh5ERcdOgc2UYd2bBqHg9sklcBcReaU\""), + // Bluesky + TXT("_atproto", "\"did=did:plc:h3rhdktoagtwfu452cjyw3df\""), + + // GitHub + TXT("_gh-radicle-dev-o", "\"4e6be9a82e\""), + PTR("b._dns-sd._udp", "radicle.xyz."), PTR("lb._dns-sd._udp", "radicle.xyz."), @@ -69,12 +72,6 @@ D("radicle.xyz", REG_NONE, DnsProvider(DSP_CLOUDFLARE), TXT("rosa._radicle-node._tcp", "\"nid=z6Mkmqogy2qEM2ummccUthFEaaHvyYmYBYh3dbe9W4ebScxo\""), - CNAME("search", "search.radicle.garden."), - - - CNAME("releases", "public.r2.dev.", CF_PROXY_ON), - - A("seed", "65.108.87.205"), AAAA("seed", "2a01:4f9:c011:b666::1"), SSHFP("seed", 4, 2, "ac7db28d3d05c52f3e2d67adca4654ce6766a1e8d7b6fab4c03b25ab435a613d"), @@ -88,13 +85,19 @@ D("radicle.xyz", REG_NONE, DnsProvider(DSP_CLOUDFLARE), ALIAS("metrics", "seed"), ALIAS("vault", "seed"), - // LOC("seed", "60 20 36.488 N 25 01 48.587 E 46m 10m 100m 100m"), + PTR("_radicle-node._tcp", "seed._radicle-node._tcp.radicle.xyz."), SRV("seed._radicle-node._tcp", 32767, 32767, 8776, "seed.radicle.xyz."), SRV("seed._radicle-node._tcp", 32767, 32767, 58776, "seed.radicle.xyz."), TXT("seed._radicle-node._tcp", "\"nid=z6MksmpU5b1dS7oaqF2bHXhQi1DWy2hB7Mh9CuN7y1DN6QSz\""), + CNAME("search", "search.radicle.garden."), + + + CNAME("releases", "public.r2.dev.", CF_PROXY_ON), + + NS("bootstrap", "seed"), @@ -103,6 +106,14 @@ D("radicle.xyz", REG_NONE, DnsProvider(DSP_CLOUDFLARE), D("radicle.dev", REG_NONE, DnsProvider(DSP_CLOUDFLARE), AAAA("@", "100::", CF_PROXY_ON), + AAAA("desktop", "100::", CF_PROXY_ON), + + + CNAME("docs", "radicle.dev."), + CNAME("www", "radicle.dev."), + + + CNAME("toot", "vip.masto.host."), // Migadu @@ -123,13 +134,46 @@ D("radicle.dev", REG_NONE, DnsProvider(DSP_CLOUDFLARE), // Google Search Console TXT("@", "\"google-site-verification=r8cK7DIKc0RWNAOBhyHmfOb9FSwrCKiZs2JQ6cLOuK4\""), + // Bluesky + TXT("_atproto", "\"did=did:plc:h3rhdktoagtwfu452cjyw3df\""), + + // GitHub + TXT("_gh-radicle-dev-o", "\"05261552ed\""), + A("blackhole", "192.0.2.1"), + + + PTR("b._dns-sd._udp", "radicle.dev."), + PTR("lb._dns-sd._udp", "radicle.dev."), + PTR("_services._dns-sd._udp", "_radicle-node._tcp.radicle.dev."), + + + A("seed", "65.108.87.205"), + AAAA("seed", "2a01:4f9:c011:b666::1"), + SSHFP("seed", 4, 2, "ac7db28d3d05c52f3e2d67adca4654ce6766a1e8d7b6fab4c03b25ab435a613d"), + SSHFP("seed", 4, 1, "9033b89019264dbad5a744057166a5e1b7af92f7"), + + ALIAS("attic", "seed"), + ALIAS("files", "seed"), + ALIAS("grafana", "seed"), + ALIAS("logs", "seed"), + ALIAS("loki", "seed"), + ALIAS("metrics", "seed"), + ALIAS("vault", "seed"), + + PTR("_radicle-node._tcp", "seed._radicle-node._tcp.radicle.dev."), + SRV("seed._radicle-node._tcp", 32767, 32767, 8776, "seed.radicle.dev."), + SRV("seed._radicle-node._tcp", 32767, 32767, 58776, "seed.radicle.dev."), + TXT("seed._radicle-node._tcp", "\"nid=z6MksmpU5b1dS7oaqF2bHXhQi1DWy2hB7Mh9CuN7y1DN6QSz\""), ); D("radicle.network", REG_NONE, DnsProvider(DSP_CLOUDFLARE), AAAA("@", "100::", CF_PROXY_ON), + TXT("_gh-radicle-dev-o", "\"eed4033e97\""), + + // Migadu MX("@", 10, "aspmx1.migadu.com."), MX("@", 20, "aspmx2.migadu.com."), @@ -154,10 +198,34 @@ D("radicle.network", REG_NONE, DnsProvider(DSP_CLOUDFLARE), PTR("lb._dns-sd._udp", "radicle.network."), PTR("_services._dns-sd._udp", "_radicle-node._tcp.radicle.network."), + + A("iris", "95.217.156.6"), + AAAA("iris", "2a01:4f9:c010:dfaa::1"), + SSHFP("iris", 4, 1, "1ffe43af8f30c34373515fa24f1b9fe69532a9d5"), + SSHFP("iris", 4, 2, "715ce29a1ccdd7088b9fb40949ca186e736ff6d711163689560ffe54252c9d43"), + + PTR("_radicle-node._tcp", "iris._radicle-node._tcp.radicle.network."), + SRV("iris._radicle-node._tcp", 32767, 32767, 8776, "iris.radicle.network."), + SRV("iris._radicle-node._tcp", 32767, 32767, 58776, "iris.radicle.network."), + TXT("iris._radicle-node._tcp", "\"nid=z6MkrLMMsiPWUcNPHcRajuMi9mDfYckSoJyPwwnknocNYPm7\""), + + + A("rosa", "5.161.85.124"), + AAAA("rosa", "2a01:4ff:f0:abd3::1"), + SSHFP("rosa", 4, 1, "6ee4b941f49ece1601e238344f088f5a83712b91"), + SSHFP("rosa", 4, 2, "e2364a3e0f7728eaa53d40543f15e7c23409fe06e5b08c55d8f63ee00e963b0b"), + + PTR("_radicle-node._tcp", "rosa._radicle-node._tcp.radicle.network."), + SRV("rosa._radicle-node._tcp", 32767, 32767, 8776, "rosa.radicle.network."), + SRV("rosa._radicle-node._tcp", 32767, 32767, 58776, "rosa.radicle.network."), + TXT("rosa._radicle-node._tcp", "\"nid=z6Mkmqogy2qEM2ummccUthFEaaHvyYmYBYh3dbe9W4ebScxo\""), + + CNAME("search", "search.radicle.garden."), - NS("bootstrap", "seed.radicle.xyz."), + NS("bootstrap", "seed.radicle.dev."), + A("blackhole", "192.0.2.1"), ); @@ -184,4 +252,6 @@ D("radicle.community", REG_NONE, DnsProvider(DSP_CLOUDFLARE), // Google Search Console TXT("@", "\"google-site-verification=UEvCt4qHEQtB1ql2LREQumXpl291d6ajUm70A3g_j94\""), + + A("blackhole", "192.0.2.1"), ); diff --git a/flake.nix b/flake.nix index 185dabd..050eecb 100644 --- a/flake.nix +++ b/flake.nix @@ -153,9 +153,9 @@ result; in { nixosConfigurations = { - seed = host (import ./os/host/seed); - iris = host (import ./os/host/iris); - rosa = host (import ./os/host/rosa); + "seed.radicle.dev" = host (import ./os/host/dev/seed); + "iris.radicle.network" = host (import ./os/host/network/iris); + "rosa.radicle.network" = host (import ./os/host/network/rosa); }; devShells.${system}.default = pkgs.mkShell { diff --git a/os/host/seed/attic.nix b/os/host/dev/seed/attic.nix similarity index 83% rename from os/host/seed/attic.nix rename to os/host/dev/seed/attic.nix index 283b509..8c884a7 100644 --- a/os/host/seed/attic.nix +++ b/os/host/dev/seed/attic.nix @@ -1,5 +1,5 @@ {config, ...}: let - domain = "attic.radicle.xyz"; + domain = "attic.radicle.dev"; port = 54862; secret = "atticd.env"; in { @@ -38,5 +38,11 @@ in { ''; }; }; + nginx.virtualHosts."attic.radicle.xyz" = { + enableACME = true; + forceSSL = true; + globalRedirect = domain; + redirectCode = 302; + }; }; } diff --git a/os/host/seed/bootstrap/addresses.sql b/os/host/dev/seed/bootstrap/addresses.sql similarity index 100% rename from os/host/seed/bootstrap/addresses.sql rename to os/host/dev/seed/bootstrap/addresses.sql diff --git a/os/host/seed/bootstrap/default.nix b/os/host/dev/seed/bootstrap/default.nix similarity index 82% rename from os/host/seed/bootstrap/default.nix rename to os/host/dev/seed/bootstrap/default.nix index 4af09e8..649bb6f 100644 --- a/os/host/seed/bootstrap/default.nix +++ b/os/host/dev/seed/bootstrap/default.nix @@ -16,7 +16,7 @@ --from-file "${./zone.jq}" \ > "/etc/knot/dns-sd.zone" - knotc -b zone-reload "bootstrap.radicle.xyz" + knotc -b zone-reload "bootstrap.radicle.network" ''; wants = ["knot.service"]; requires = ["knot.service"]; @@ -35,11 +35,11 @@ wantedBy = ["timers.target"]; }; }; - services.nginx.virtualHosts."bootstrap.radicle.xyz" = { + services.nginx.virtualHosts."bootstrap.radicle.network" = { enableACME = true; forceSSL = true; - serverName = "bootstrap.radicle.xyz"; - root = "/var/www/bootstrap.radicle.xyz"; + serverName = "bootstrap.radicle.network"; + root = "/var/www/bootstrap.radicle.network"; locations."/".extraConfig = '' add_header 'Access-Control-Allow-Origin' '*'; autoindex on; diff --git a/os/host/seed/bootstrap/zone.jq b/os/host/dev/seed/bootstrap/zone.jq similarity index 100% rename from os/host/seed/bootstrap/zone.jq rename to os/host/dev/seed/bootstrap/zone.jq diff --git a/os/host/seed/default.nix b/os/host/dev/seed/default.nix similarity index 88% rename from os/host/seed/default.nix rename to os/host/dev/seed/default.nix index 3a73cb8..668c15d 100644 --- a/os/host/seed/default.nix +++ b/os/host/dev/seed/default.nix @@ -7,13 +7,13 @@ ... }: { imports = [ - ../../mixin/cache.nix - ../../mixin/common.nix - ../../mixin/kmscon.nix - ../../mixin/nix.nix - ../../mixin/motd.nix - ../../mixin/sops.nix - ../../mixin/users.nix + ../../../mixin/cache.nix + ../../../mixin/common.nix + ../../../mixin/kmscon.nix + ../../../mixin/nix.nix + ../../../mixin/motd.nix + ../../../mixin/sops.nix + ../../../mixin/users.nix ./attic.nix ./knot.nix @@ -83,6 +83,7 @@ }; networking = { + domain = "radicle.dev"; hostName = "seed"; useDHCP = false; diff --git a/os/host/seed/files.nix b/os/host/dev/seed/files.nix similarity index 72% rename from os/host/seed/files.nix rename to os/host/dev/seed/files.nix index 62f395d..f987bdc 100644 --- a/os/host/seed/files.nix +++ b/os/host/dev/seed/files.nix @@ -1,21 +1,35 @@ let - name = "files.radicle.xyz"; + name = { + xyz = "files.radicle.xyz"; + dev = "files.radicle.dev"; + }; in { - fileSystems."/var/www/${name}" = { + fileSystems."/var/www/${name.dev}" = { device = "/dev/disk/by-id/scsi-0HC_Volume_30083854"; fsType = "ext4"; options = ["discard" "defaults"]; }; - services.nginx.virtualHosts.${name} = { - root = "/var/www/${name}"; + services.nginx.virtualHosts.${name.xyz} = { + globalRedirect = name.dev; + redirectCode = 302; + enableACME = true; + forceSSL = true; + serverName = name.xyz; + extraConfig = '' + add_header 'Access-Control-Allow-Origin' '*'; + ''; + }; + + services.nginx.virtualHosts.${name.dev} = { + root = "/var/www/${name.dev}"; extraConfig = '' add_header 'Access-Control-Allow-Origin' '*'; autoindex on; ''; enableACME = true; forceSSL = true; - serverName = name; + serverName = name.dev; }; users.users = { diff --git a/os/host/seed/grafana.nix b/os/host/dev/seed/grafana.nix similarity index 76% rename from os/host/seed/grafana.nix rename to os/host/dev/seed/grafana.nix index 1da36ad..4fd9780 100644 --- a/os/host/seed/grafana.nix +++ b/os/host/dev/seed/grafana.nix @@ -3,7 +3,7 @@ pkgs, ... }: let - domain = "grafana.radicle.xyz"; + domain = "grafana.radicle.dev"; port = 3000; in { services = { @@ -31,5 +31,12 @@ in { ''; }; }; + + nginx.virtualHosts."grafana.radicle.xyz" = { + enableACME = true; + forceSSL = true; + globalRedirect = domain; + redirectCode = 302; + }; }; } diff --git a/os/host/seed/knot.nix b/os/host/dev/seed/knot.nix similarity index 95% rename from os/host/seed/knot.nix rename to os/host/dev/seed/knot.nix index ed35de3..b239ab7 100644 --- a/os/host/seed/knot.nix +++ b/os/host/dev/seed/knot.nix @@ -24,9 +24,9 @@ in { environment.etc."knot/common.zone".source = ./zone/common.zone; environment.etc."knot/secondaries.zone".source = ./zone/secondaries.zone; - environment.etc."knot/bootstrap.radicle.xyz.zone".text = '' + environment.etc."knot/bootstrap.radicle.network.zone".text = '' $TTL 3600 - @ SOA ns1 lorenz\.leutgeb.radicle.xyz. 2025101002 14400 3600 1209600 3600 + @ SOA ns1 lorenz\.leutgeb.radicle.dev. 2025101002 14400 3600 1209600 3600 $INCLUDE common.zone $INCLUDE dns-sd.zone ''; @@ -190,7 +190,7 @@ in { zone = [ { file = "/etc/knot/bootstrap.zone"; - domain = "bootstrap.radicle.xyz"; + domain = "bootstrap.radicle.network"; template = "primary"; dnssec-signing = true; } diff --git a/os/host/dev/seed/radicle.nix b/os/host/dev/seed/radicle.nix new file mode 100644 index 0000000..d91cbe9 --- /dev/null +++ b/os/host/dev/seed/radicle.nix @@ -0,0 +1,28 @@ +{ + config, + pkgs, + lib, + ... +}: { + imports = [ + ../../../mixin/radicle.nix + ../../../mixin/radicle-stats.nix + ]; + + fileSystems."/var/lib/radicle" = { + device = "/dev/disk/by-id/scsi-0HC_Volume_30473554"; + fsType = "ext4"; + options = ["discard" "defaults"]; + }; + + services.radicle = { + httpd.nginx.serverAliases = ["seed.radicle.xyz"]; + + settings = { + fetch.signedReferences.featureLevel.minimum = "parent"; + node.externalAddresses = lib.mkAfter [ + "seedradanrg2oje34eyidx4z63gpuakgaedaetvt7xxw5whv6qnexmid.onion:58776" + ]; + }; + }; +} diff --git a/os/host/seed/sops/README.md b/os/host/dev/seed/sops/README.md similarity index 100% rename from os/host/seed/sops/README.md rename to os/host/dev/seed/sops/README.md diff --git a/os/host/seed/sops/atticd.env b/os/host/dev/seed/sops/atticd.env similarity index 100% rename from os/host/seed/sops/atticd.env rename to os/host/dev/seed/sops/atticd.env diff --git a/os/host/seed/sops/ssh.yaml b/os/host/dev/seed/sops/ssh.yaml similarity index 100% rename from os/host/seed/sops/ssh.yaml rename to os/host/dev/seed/sops/ssh.yaml diff --git a/os/host/seed/sops/tor_hs_ed25519_secret_key.bin.json b/os/host/dev/seed/sops/tor_hs_ed25519_secret_key.bin.json similarity index 100% rename from os/host/seed/sops/tor_hs_ed25519_secret_key.bin.json rename to os/host/dev/seed/sops/tor_hs_ed25519_secret_key.bin.json diff --git a/os/host/seed/ssh.nix b/os/host/dev/seed/ssh.nix similarity index 91% rename from os/host/seed/ssh.nix rename to os/host/dev/seed/ssh.nix index d1cd8b0..96422a0 100644 --- a/os/host/seed/ssh.nix +++ b/os/host/dev/seed/ssh.nix @@ -5,7 +5,7 @@ ... }: { imports = [ - ../../mixin/ssh.nix + ../../../mixin/ssh.nix ]; sops.secrets ."ssh/key".sopsFile = ./sops/ssh.yaml; diff --git a/os/host/seed/tor.nix b/os/host/dev/seed/tor.nix similarity index 77% rename from os/host/seed/tor.nix rename to os/host/dev/seed/tor.nix index f0f13b0..c05eb09 100644 --- a/os/host/seed/tor.nix +++ b/os/host/dev/seed/tor.nix @@ -1,6 +1,6 @@ let secret = "tor/hs_ed25519_secret_key"; in { - imports = [../../mixin/tor.nix]; + imports = [../../../mixin/tor.nix]; sops.secrets.${secret}.sopsFile = ./sops/tor_hs_ed25519_secret_key.bin.json; } diff --git a/os/host/seed/victorialogs.nix b/os/host/dev/seed/victorialogs.nix similarity index 100% rename from os/host/seed/victorialogs.nix rename to os/host/dev/seed/victorialogs.nix diff --git a/os/host/seed/zone/common.zone b/os/host/dev/seed/zone/common.zone similarity index 51% rename from os/host/seed/zone/common.zone rename to os/host/dev/seed/zone/common.zone index ded19d2..8a9cbc0 100644 --- a/os/host/seed/zone/common.zone +++ b/os/host/dev/seed/zone/common.zone @@ -2,7 +2,7 @@ $TTL 3600 @ CAA 0 issue "letsencrypt.org" - NS seed.radicle.xyz + NS seed.radicle.dev A 65.108.87.205 AAAA 2a01:4f9:c011:b666::1 @@ -10,8 +10,8 @@ $TTL 3600 * A 65.108.87.205 AAAA 2a01:4f9:c011:b666::1 -b._dns-sd._udp 86400 PTR bootstrap.radicle.xyz. -db._dns-sd._udp 86400 PTR bootstrap.radicle.xyz. -lb._dns-sd._udp 86400 PTR bootstrap.radicle.xyz. +b._dns-sd._udp 86400 PTR bootstrap.radicle.network. +db._dns-sd._udp 86400 PTR bootstrap.radicle.network. +lb._dns-sd._udp 86400 PTR bootstrap.radicle.network. _services._dns-sd._udp 86400 PTR _radicle-node._tcp diff --git a/os/host/seed/zone/secondaries.zone b/os/host/dev/seed/zone/secondaries.zone similarity index 100% rename from os/host/seed/zone/secondaries.zone rename to os/host/dev/seed/zone/secondaries.zone diff --git a/os/host/iris/default.nix b/os/host/network/iris/default.nix similarity index 75% rename from os/host/iris/default.nix rename to os/host/network/iris/default.nix index 7d685a8..5c87e51 100644 --- a/os/host/iris/default.nix +++ b/os/host/network/iris/default.nix @@ -7,14 +7,14 @@ ... }: { imports = [ - ../../mixin/cache.nix - ../../mixin/common.nix - ../../mixin/disk-config.nix - ../../mixin/kmscon.nix - ../../mixin/motd.nix - ../../mixin/nix.nix - ../../mixin/sops.nix - ../../mixin/users.nix + ../../../mixin/cache.nix + ../../../mixin/common.nix + ../../../mixin/disk-config.nix + ../../../mixin/kmscon.nix + ../../../mixin/motd.nix + ../../../mixin/nix.nix + ../../../mixin/sops.nix + ../../../mixin/users.nix ./ssh.nix ./radicle.nix @@ -35,6 +35,7 @@ }; networking = { + domain = "radicle.network"; hostName = "iris"; useDHCP = false; diff --git a/os/host/iris/radicle.nix b/os/host/network/iris/radicle.nix similarity index 62% rename from os/host/iris/radicle.nix rename to os/host/network/iris/radicle.nix index a5aa6cf..b206dd9 100644 --- a/os/host/iris/radicle.nix +++ b/os/host/network/iris/radicle.nix @@ -5,9 +5,9 @@ ... }: { imports = [ - ../../mixin/radicle.nix - ../../mixin/radicle-permissive.nix - ../../mixin/radicle-stats.nix + ../../../mixin/radicle.nix + ../../../mixin/radicle-permissive.nix + ../../../mixin/radicle-stats.nix ]; fileSystems."/var/lib/radicle" = { @@ -17,8 +17,9 @@ }; services.radicle = { - httpd.nginx.serverAliases = ["seed.radicle.garden"]; + httpd.nginx.serverAliases = ["seed.radicle.garden" "iris.radicle.xyz" "iris.radicle.network"]; settings.node.externalAddresses = lib.mkAfter [ + "iris.radicle.xyz:58776" "irisradizskwweumpydlj4oammoshkxxjur3ztcmo7cou5emc6s5lfid.onion:58776" ]; }; diff --git a/os/host/iris/sops/ssh.yaml b/os/host/network/iris/sops/ssh.yaml similarity index 100% rename from os/host/iris/sops/ssh.yaml rename to os/host/network/iris/sops/ssh.yaml diff --git a/os/host/iris/sops/tor_hs_ed25519_secret_key.bin.json b/os/host/network/iris/sops/tor_hs_ed25519_secret_key.bin.json similarity index 100% rename from os/host/iris/sops/tor_hs_ed25519_secret_key.bin.json rename to os/host/network/iris/sops/tor_hs_ed25519_secret_key.bin.json diff --git a/os/host/iris/ssh.nix b/os/host/network/iris/ssh.nix similarity index 91% rename from os/host/iris/ssh.nix rename to os/host/network/iris/ssh.nix index 79fe6db..45bb0bc 100644 --- a/os/host/iris/ssh.nix +++ b/os/host/network/iris/ssh.nix @@ -5,7 +5,7 @@ ... }: { imports = [ - ../../mixin/ssh.nix + ../../../mixin/ssh.nix ]; sops.secrets."ssh/key".sopsFile = ./sops/ssh.yaml; diff --git a/os/host/rosa/tor.nix b/os/host/network/iris/tor.nix similarity index 77% rename from os/host/rosa/tor.nix rename to os/host/network/iris/tor.nix index f0f13b0..c05eb09 100644 --- a/os/host/rosa/tor.nix +++ b/os/host/network/iris/tor.nix @@ -1,6 +1,6 @@ let secret = "tor/hs_ed25519_secret_key"; in { - imports = [../../mixin/tor.nix]; + imports = [../../../mixin/tor.nix]; sops.secrets.${secret}.sopsFile = ./sops/tor_hs_ed25519_secret_key.bin.json; } diff --git a/os/host/rosa/default.nix b/os/host/network/rosa/default.nix similarity index 74% rename from os/host/rosa/default.nix rename to os/host/network/rosa/default.nix index 172df37..88a7b04 100644 --- a/os/host/rosa/default.nix +++ b/os/host/network/rosa/default.nix @@ -7,14 +7,14 @@ ... }: { imports = [ - ../../mixin/cache.nix - ../../mixin/common.nix - ../../mixin/disk-config.nix - ../../mixin/kmscon.nix - ../../mixin/motd.nix - ../../mixin/nix.nix - ../../mixin/sops.nix - ../../mixin/users.nix + ../../../mixin/cache.nix + ../../../mixin/common.nix + ../../../mixin/disk-config.nix + ../../../mixin/kmscon.nix + ../../../mixin/motd.nix + ../../../mixin/nix.nix + ../../../mixin/sops.nix + ../../../mixin/users.nix ./ssh.nix ./radicle.nix @@ -35,6 +35,7 @@ }; networking = { + domain = "radicle.network"; hostName = "rosa"; useDHCP = false; diff --git a/os/host/rosa/radicle.nix b/os/host/network/rosa/radicle.nix similarity index 62% rename from os/host/rosa/radicle.nix rename to os/host/network/rosa/radicle.nix index 9f0195f..24b4e1e 100644 --- a/os/host/rosa/radicle.nix +++ b/os/host/network/rosa/radicle.nix @@ -5,9 +5,9 @@ ... }: { imports = [ - ../../mixin/radicle.nix - ../../mixin/radicle-permissive.nix - ../../mixin/radicle-stats.nix + ../../../mixin/radicle.nix + ../../../mixin/radicle-permissive.nix + ../../../mixin/radicle-stats.nix ]; fileSystems."/var/lib/radicle" = { @@ -17,8 +17,9 @@ }; services.radicle = { - httpd.nginx.serverAliases = ["ash.radicle.garden"]; + httpd.nginx.serverAliases = ["ash.radicle.garden" "rosa.radicle.xyz" "rosa.radicle.network"]; settings.node.externalAddresses = lib.mkAfter [ + "rosa.radicle.xyz:58776" "rosarad5bxgdlgjnzzjygnsxrwxmoaj4vn7xinlstwglxvyt64jlnhyd.onion:58776" ]; }; diff --git a/os/host/rosa/sops/ssh.yaml b/os/host/network/rosa/sops/ssh.yaml similarity index 100% rename from os/host/rosa/sops/ssh.yaml rename to os/host/network/rosa/sops/ssh.yaml diff --git a/os/host/rosa/sops/tor_hs_ed25519_secret_key.bin.json b/os/host/network/rosa/sops/tor_hs_ed25519_secret_key.bin.json similarity index 100% rename from os/host/rosa/sops/tor_hs_ed25519_secret_key.bin.json rename to os/host/network/rosa/sops/tor_hs_ed25519_secret_key.bin.json diff --git a/os/host/rosa/ssh.nix b/os/host/network/rosa/ssh.nix similarity index 91% rename from os/host/rosa/ssh.nix rename to os/host/network/rosa/ssh.nix index 6a7595a..c69b25d 100644 --- a/os/host/rosa/ssh.nix +++ b/os/host/network/rosa/ssh.nix @@ -5,7 +5,7 @@ ... }: { imports = [ - ../../mixin/ssh.nix + ../../../mixin/ssh.nix ]; sops.secrets."ssh/key".sopsFile = ./sops/ssh.yaml; diff --git a/os/host/iris/tor.nix b/os/host/network/rosa/tor.nix similarity index 77% rename from os/host/iris/tor.nix rename to os/host/network/rosa/tor.nix index f0f13b0..c05eb09 100644 --- a/os/host/iris/tor.nix +++ b/os/host/network/rosa/tor.nix @@ -1,6 +1,6 @@ let secret = "tor/hs_ed25519_secret_key"; in { - imports = [../../mixin/tor.nix]; + imports = [../../../mixin/tor.nix]; sops.secrets.${secret}.sopsFile = ./sops/tor_hs_ed25519_secret_key.bin.json; } diff --git a/os/host/seed/radicle.nix b/os/host/seed/radicle.nix deleted file mode 100644 index a2fd4e9..0000000 --- a/os/host/seed/radicle.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: { - imports = [ - ../../mixin/radicle.nix - ../../mixin/radicle-stats.nix - ]; - - fileSystems."/var/lib/radicle" = { - device = "/dev/disk/by-id/scsi-0HC_Volume_30473554"; - fsType = "ext4"; - options = ["discard" "defaults"]; - }; - - services.radicle.settings = { - fetch.signedReferences.featureLevel.minimum = "parent"; - node.externalAddresses = lib.mkAfter [ - "seedradanrg2oje34eyidx4z63gpuakgaedaetvt7xxw5whv6qnexmid.onion:58776" - ]; - }; -} diff --git a/os/mixin/common.nix b/os/mixin/common.nix index b56992d..9fff9af 100644 --- a/os/mixin/common.nix +++ b/os/mixin/common.nix @@ -7,7 +7,6 @@ i18n.defaultLocale = "en_US.UTF-8"; networking = { - domain = "radicle.xyz"; useNetworkd = true; };