{ pkgs, ... }: { imports = [ ./disk-config.nix ]; boot.loader.grub = { enable = true; efiSupport = true; efiInstallAsRemovable = true; device = "nodev"; }; networking = { hostName = "netcup"; useDHCP = false; interfaces.eth0 = { ipv4.addresses = [ { address = "152.53.168.144"; prefixLength = 22; } ]; ipv6.addresses = [ { address = "2a0a:4cc0:2000:af7d:c8e4:dff:fe7f:c233"; prefixLength = 64; } ]; }; defaultGateway = { address = "152.53.168.1"; interface = "eth0"; }; defaultGateway6 = { address = "fe80::1"; interface = "eth0"; }; nameservers = [ "1.1.1.1" "8.8.8.8" ]; firewall.allowedTCPPorts = [ 22 80 443 ]; }; services.openssh = { enable = true; settings = { PermitRootLogin = "prohibit-password"; PasswordAuthentication = false; }; }; users.users.root.openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILA1pOJawzHtJqIn56AZT4IhPUh9vUEhLPLwndk5s3iM br.barrettruth@gmail.com" ]; security.acme = { acceptTerms = true; defaults.email = "br.barrettruth@gmail.com"; }; services.nginx = { enable = true; recommendedProxySettings = true; recommendedTlsSettings = true; virtualHosts."vault.barrettruth.com" = { enableACME = true; forceSSL = true; locations."/".proxyPass = "http://127.0.0.1:8222"; }; virtualHosts."git.barrettruth.com" = { enableACME = true; forceSSL = true; locations."/".proxyPass = "http://127.0.0.1:3000"; }; }; services.vaultwarden = { enable = true; backupDir = "/var/backup/vaultwarden"; environmentFile = "/var/lib/vaultwarden/vaultwarden.env"; config = { DOMAIN = "https://vault.barrettruth.com"; SIGNUPS_ALLOWED = false; ROCKET_ADDRESS = "127.0.0.1"; ROCKET_PORT = 8222; }; }; services.forgejo = { enable = true; settings = { server = { DOMAIN = "git.barrettruth.com"; ROOT_URL = "https://git.barrettruth.com/"; HTTP_PORT = 3000; }; service.DISABLE_REGISTRATION = true; }; }; environment.systemPackages = with pkgs; [ vim git ]; nix.settings = { auto-optimise-store = true; experimental-features = [ "nix-command" "flakes" ]; }; nix.gc = { automatic = true; dates = "weekly"; options = "--delete-older-than 7d"; }; system.stateVersion = "24.11"; }