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
|
2024-05-25 16:40:17 +01:00
|
|
|
|
networking.useNetworkd = true;
|
2024-02-11 22:33:15 +00:00
|
|
|
|
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;
|
2024-02-11 22:24:35 +00:00
|
|
|
|
services.tailscale = {
|
2024-02-11 22:33:15 +00:00
|
|
|
|
enable = true;
|
2024-02-11 22:24:35 +00:00
|
|
|
|
authKeyFile = config.age.secrets."tailscale/theon.storage.ts.hillion.co.uk".path;
|
2024-02-11 22:33:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
## Packages
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
scrub
|
|
|
|
|
smartmontools
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
}
|