2023-09-20 11:52:00 +02:00
|
|
|
{ config, lib, pkgs, modulesPath, desktop, username, ... }: {
|
2023-09-20 13:26:12 +02:00
|
|
|
imports = [
|
|
|
|
./disks.nix
|
2023-10-08 10:20:24 +02:00
|
|
|
./xinetd.nix
|
|
|
|
./wireguard.nix
|
2023-09-20 13:26:12 +02:00
|
|
|
];
|
2023-10-07 12:33:05 +02:00
|
|
|
# Enable distributed Builds
|
|
|
|
nix.distributedBuilds = true;
|
2023-09-20 11:52:00 +02:00
|
|
|
nixpkgs.config.allowUnfree = false;
|
|
|
|
|
2023-09-20 12:40:48 +02:00
|
|
|
boot.initrd.availableKernelModules = [ "ata_piix" "ohci_pci" "virtio_pci" "virtio_blk" "sr_mod" ];
|
2023-09-20 11:52:00 +02:00
|
|
|
boot.initrd.kernelModules = [ ];
|
2023-10-08 07:13:48 +02:00
|
|
|
boot.kernelModules = [ "iptable_nat" "iptable_filter" "xt_nat" ];
|
2023-09-20 11:52:00 +02:00
|
|
|
boot.extraModulePackages = [ ];
|
2023-09-20 13:33:35 +02:00
|
|
|
virtualisation.hypervGuest.enable = true;
|
2023-09-20 11:52:00 +02:00
|
|
|
|
|
|
|
networking.useDHCP = lib.mkDefault true;
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
|
|
time.timeZone = "Asia/Tokyo";
|
2023-10-04 12:51:02 +02:00
|
|
|
networking.hostName = "osaka-vultr-01";
|
2023-09-20 11:52:00 +02:00
|
|
|
|
2023-10-13 06:31:48 +02:00
|
|
|
# networking.firewall.allowedTCPPorts = [ 22 ];
|
2023-10-08 12:21:29 +02:00
|
|
|
|
2023-10-08 10:34:07 +02:00
|
|
|
# Generic Tailscale configs are in /nixos/common/services/tailscale.nix
|
|
|
|
# Set up the secrets file:
|
|
|
|
sops.secrets."tailscale_keys/osaka-vultr-01" = {
|
|
|
|
owner = "root";
|
|
|
|
sopsFile = ../../../secrets/tailscale.yaml;
|
|
|
|
restartUnits = [
|
|
|
|
"tailscaled.service"
|
|
|
|
"tailscaled-autoconnect.service"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
services.tailscale.authKeyFile = "/run/secrets/tailscale_keys/osaka-vultr-01";
|
|
|
|
services.tailscale.extraUpFlags = [ "--advertise-exit-node" ];
|
2023-09-20 13:54:06 +02:00
|
|
|
}
|