Skip to content

Commit

Permalink
hosts(bwg-lax): replace v-ps-sjc
Browse files Browse the repository at this point in the history
  • Loading branch information
xddxdd committed Nov 4, 2024
1 parent 0fb8b8e commit 4af8ec5
Show file tree
Hide file tree
Showing 13 changed files with 73 additions and 49 deletions.
2 changes: 1 addition & 1 deletion dns/common/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

config.common = rec {
inherit (LT) hosts;
fallbackServer = LT.hosts.v-ps-sjc;
fallbackServer = LT.hosts.bwg-lax;

apexRecords =
_domain:
Expand Down
3 changes: 2 additions & 1 deletion dns/common/host-recs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ let
replacedHosts = {
"50kvm" = LT.hosts."v-ps-hkg";
gigsgigscloud = LT.hosts."v-ps-hkg";
hostdare = LT.hosts."bwg-lax";
linkin = LT.hosts."v-ps-hkg";
hostdare = LT.hosts."v-ps-sjc";
oneprovider = LT.hosts."hetzner-de";
soyoustart = LT.hosts."hetzner-de";
v-ps-sjc = LT.hosts."bwg-lax";
virmach-ny3ip = LT.hosts."virmach-ny6g";
virtono = LT.hosts."buyvm";
};
Expand Down
4 changes: 2 additions & 2 deletions dns/common/nameservers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ _:
let
PublicServers = [
"v-ps-hkg.lantian.pub."
"v-ps-sjc.lantian.pub."
"bwg-lax.lantian.pub."
"virmach-ny1g.lantian.pub."
"hetzner-de.lantian.pub."
"buyvm.lantian.pub."
];

LTNetServers = [
"v-ps-hkg.ltnet.lantian.pub."
"v-ps-sjc.ltnet.lantian.pub."
"bwg-lax.ltnet.lantian.pub."
"virmach-ny1g.ltnet.lantian.pub."
"hetzner-de.ltnet.lantian.pub."
"buyvm.ltnet.lantian.pub."
Expand Down
2 changes: 1 addition & 1 deletion dns/domains/lantian.dn42.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
})
(config.common.hostRecs.mapAddresses {
name = "ns2.${domain}.";
addresses = LT.hosts."v-ps-sjc".dn42;
addresses = LT.hosts."bwg-lax".dn42;
})
(config.common.hostRecs.mapAddresses {
name = "ns3.${domain}.";
Expand Down
2 changes: 1 addition & 1 deletion dns/domains/lantian.neo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
})
(config.common.hostRecs.mapAddresses {
name = "ns2.${domain}.";
addresses = LT.hosts."v-ps-sjc".neonetwork;
addresses = LT.hosts."bwg-lax".neonetwork;
})
(config.common.hostRecs.mapAddresses {
name = "ns3.${domain}.";
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions hosts/bwg-lax/configuration.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{ LT, ... }:
{
imports = [
../../nixos/server.nix

./dn42.nix
./hardware-configuration.nix
];

systemd.network.networks.eth0 = {
address = [ "64.64.231.82/22" ];
gateway = [ "64.64.228.1" ];
matchConfig.Name = "eth0";
networkConfig.Tunnel = "henet";
};

systemd.network.networks.dummy0.address = [ "fdbc:f9dc:67ad::dd:c85a:8a93/128" ];

systemd.network.netdevs.henet = {
netdevConfig = {
Kind = "sit";
Name = "henet";
};
tunnelConfig = {
Local = LT.this.public.IPv4;
Remote = "72.52.104.74";
TTL = 255;
};
};

systemd.network.networks.henet = {
address = [
"2001:470:1f04:159::2/64"
"2001:470:1f05:159::1/64"
"2001:470:805e::1/48"
];
gateway = [ "2001:470:1f04:159::1" ];
matchConfig.Name = "henet";
};

services."route-chain" = {
enable = true;
routes = [
"172.22.76.97/29"
"2001:470:1f05:159::1/120"
"2001:470:805e::1/120"
];
};
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ _: {
];

fileSystems."/nix" = {
device = "/dev/vda1";
device = "/dev/sda1";
fsType = "btrfs";
options = [
"compress-force=zstd"
Expand All @@ -28,10 +28,10 @@ _: {
options = [ "bind" ];
};

swapDevices = [
{
device = "/dev/vda2";
randomEncryption.enable = true;
}
];
# swapDevices = [
# {
# device = "/dev/sda2";
# randomEncryption.enable = true;
# }
# ];
}
8 changes: 5 additions & 3 deletions hosts/v-ps-sjc/host.nix → hosts/bwg-lax/host.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@
public-facing
qemu
server
x86_64-v1
];
city = geo.cities."US San Jose";
city = geo.cities."US Los Angeles";
hostname = "64.64.231.82";
ssh = {
rsa = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC4aYURWnQGEkxYueAnGgZQbrQA+SHNLRgpJZd+2J9DyKdtoqXRhSjGEAGJkqBg8alWadaYJ15wvKj5BHoTQCao6XXzuxsP35Y+xtaWJ0wJ5ZJ3/J8l4z0V/85EdYqxPInQe0cpfqTEt+lnqlOOeq4f9522OMErSzefAk/MHp+OxDWr2ZdrZVggGVFpujFdCU3ckM8NMCZUufOXX2+wXQfkMXd3umGaM3oMJl6bIEyqtLwlCWnSuMEXS5JwnZ3lhKg73PO5tRaq2FcL8RXaph9uiHWmP/ch2RTnJ4xjmbhiGQuaebtCUnfW6sDZPfOv5KOx5T4V8yBOtnyDPoS2mYKva1I9HztW4JgzWzTRonFqbaH61jFalyWPTPMt/W1gQWZEnWbCewt+jBGUApBTaxDnKXywGxyjpb7MOfdLAuDkr19p9PR04G5BOw940CXeU3K0KvLjwsQN3ptHL4t6GesNWcZ3x8cxZbvi3n58GUgGjjxTro+TXgzqPU9U7JYeFPwdgoytBSPucA4DheYCkV6/V30tX8UETpGuSzWUplyVCbbXbZYGh6ulce3X4xXn0Nir3F4bzTCQlvzTWz8zkmHW1QERmStVhMJD2K7JWpe0h97zzi+jFv9QLLnfBBKjia02s7if3sZTjk4jI59B3X9Fmf3faeNXIoDMRBJcIwFtyw==";
ed25519 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH7jqK5IsCqMJqJUhAk2oQBQHhvxEb2q39BKNi1VsyOg";
};
public = {
IPv4 = "80.66.196.80";
IPv6 = "2604:a840:2::ed";
IPv4 = "64.64.231.82";
IPv6 = "2001:470:1f05:159::1";
};
dn42 = {
IPv4 = "172.22.76.185";
Expand Down
28 changes: 0 additions & 28 deletions hosts/v-ps-sjc/configuration.nix

This file was deleted.

2 changes: 1 addition & 1 deletion nixos/client-apps/v2ray.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ let
protocol = "trojan";
settings.servers = [
{
address = LT.hosts."v-ps-sjc".public.IPv4;
address = LT.hosts."bwg-lax".public.IPv4;
port = 443;
password = {
_secret = config.age.secrets.v2ray-key.path;
Expand Down
2 changes: 1 addition & 1 deletion nixos/optional-apps/bird-lg-go.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ let
"buyvm"
"oracle-vm1"
"v-ps-hkg"
"v-ps-sjc"
"bwg-lax"
"virmach-ny1g"
];
lgproxyDomain = "bird-lg-go";
Expand Down

0 comments on commit 4af8ec5

Please sign in to comment.