nixos/hosts/theon.storage.ts.hillion.co.uk/default.nix

57 lines
1.3 KiB
Nix
Raw Normal View History

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;
custom.defaults = true;
2024-02-11 22:33:15 +00:00
## Custom Services
custom = {
locations.autoServe = true;
};
## Networking
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;
services.tailscale = {
2024-02-11 22:33:15 +00:00
enable = true;
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
];
};
}