nix-infra/hosts/ocelot/default.nix

54 lines
1.5 KiB
Nix
Raw Normal View History

2024-06-01 13:19:39 +00:00
{ lib, config, ... }: {
2024-03-24 18:30:03 +00:00
imports = [
2024-04-01 17:16:35 +00:00
./gotosocial.nix
2024-04-07 11:50:21 +00:00
../../profiles/hcloud
2024-05-22 10:56:03 +00:00
./website.nix
2024-03-24 18:30:03 +00:00
];
2024-04-07 11:50:21 +00:00
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
2024-04-20 12:22:16 +00:00
cherrykitten.backups.enable = true;
2024-06-01 13:19:39 +00:00
cherrykitten.network = {
public_IPv4 = "128.140.109.125";
public_IPv6 = "2a01:4f8:c2c:bd32::1";
internal_IPv4 = "10.69.0.5";
internal_IPv6 = "fe80::9400:3ff:fe24:677a";
};
2024-04-07 11:50:21 +00:00
networking = {
nameservers = [
"8.8.8.8"
];
defaultGateway = "172.31.1.1";
defaultGateway6 = {
address = "fe80::1";
interface = "eth0";
};
dhcpcd.enable = false;
usePredictableInterfaceNames = lib.mkForce false;
interfaces = {
eth0 = {
ipv4.addresses = [
2024-06-01 13:19:39 +00:00
{ address = config.cherrykitten.network.public_IPv4; prefixLength = 32; }
2024-04-07 11:50:21 +00:00
];
ipv6.addresses = [
2024-06-01 13:19:39 +00:00
{ address = config.cherrykitten.network.public_IPv6; prefixLength = 64; }
2024-04-07 11:50:21 +00:00
];
ipv4.routes = [{ address = "172.31.1.1"; prefixLength = 32; }];
ipv6.routes = [{ address = "fe80::1"; prefixLength = 128; }];
};
2024-06-01 13:19:39 +00:00
eth1 = {
ipv4.addresses = [
{ address = config.cherrykitten.network.internal_IPv4; prefixLength = 32; }
];
ipv6.addresses = [
{ address = config.cherrykitten.network.internal_IPv6; prefixLength = 64; }
];
};
2024-04-07 11:50:21 +00:00
};
};
services.udev.extraRules = ''
ATTR{address}=="96:00:03:24:67:7a", NAME="eth0"
'';
2024-03-24 18:30:03 +00:00
system.stateVersion = "23.11";
}