2024-02-11 22:33:15 +00:00
|
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
imports = [
|
|
|
|
|
./hardware-configuration.nix
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
config = {
|
|
|
|
|
system.stateVersion = "23.11";
|
|
|
|
|
|
|
|
|
|
networking.hostName = "theon";
|
|
|
|
|
networking.domain = "storage.ts.hillion.co.uk";
|
|
|
|
|
|
|
|
|
|
boot.loader.grub.enable = false;
|
|
|
|
|
boot.loader.generic-extlinux-compatible.enable = true;
|
2024-04-27 12:45:03 +01:00
|
|
|
|
|
|
|
|
|
custom.defaults = true;
|
2024-02-11 22:33:15 +00:00
|
|
|
|
|
|
|
|
|
## Custom Services
|
|
|
|
|
custom = {
|
|
|
|
|
locations.autoServe = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
## Networking
|
|
|
|
|
systemd.network.enable = true;
|
|
|
|
|
|
2024-04-26 19:29:13 +01:00
|
|
|
|
networking.nameservers = lib.mkForce [ ]; # Trust the DHCP nameservers
|
2024-02-11 22:33:15 +00:00
|
|
|
|
networking.firewall = {
|
|
|
|
|
trustedInterfaces = [ "tailscale0" ];
|
|
|
|
|
allowedTCPPorts = lib.mkForce [
|
|
|
|
|
22 # SSH
|
|
|
|
|
];
|
|
|
|
|
allowedUDPPorts = lib.mkForce [ ];
|
|
|
|
|
interfaces = {
|
|
|
|
|
end0 = {
|
|
|
|
|
allowedTCPPorts = lib.mkForce [ ];
|
|
|
|
|
allowedUDPPorts = lib.mkForce [ ];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
## Tailscale
|
|
|
|
|
age.secrets."tailscale/theon.storage.ts.hillion.co.uk".file = ../../secrets/tailscale/theon.storage.ts.hillion.co.uk.age;
|
|
|
|
|
custom.tailscale = {
|
|
|
|
|
enable = true;
|
|
|
|
|
preAuthKeyFile = config.age.secrets."tailscale/theon.storage.ts.hillion.co.uk".path;
|
|
|
|
|
ipv4Addr = "100.104.142.22";
|
|
|
|
|
ipv6Addr = "fd7a:115c:a1e0::4aa8:8e16";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
## Packages
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
scrub
|
|
|
|
|
smartmontools
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
}
|