nix/nixos/hosts/milan-linode-01/default.nix

44 lines
1.2 KiB
Nix
Raw Normal View History

2024-08-20 14:21:54 +02:00
{ hostname, lib, modulesPath, ... }: {
2024-03-15 02:28:10 +01:00
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
../../common/services/tailscale-autoconnect.nix
2024-03-25 01:49:11 +01:00
./firewall.nix
2024-08-20 14:21:54 +02:00
../../common/services/docker.nix
2024-08-12 06:25:09 +02:00
(import ../../common/containers/derp.nix { domainName = "milan.sysctl.io"; })
2024-03-15 02:28:10 +01:00
];
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
# Enable LISH
boot.kernelParams = [ "console=ttyS0,19200n8" ];
boot.loader.grub.extraConfig = ''
serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1;
terminal_input serial;
terminal_output serial
'';
boot.loader.grub.forceInstall = true;
boot.loader.grub.device = "nodev";
boot.loader.timeout = 10;
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
swapDevices = [ { device = "/dev/disk/by-label/linode-swap"; } ];
# Distributed Builds
nix.distributedBuilds = true;
networking.useDHCP = lib.mkDefault true;
time.timeZone = "Europe/Rome";
2024-08-20 14:21:54 +02:00
networking.hostName = hostname;
2024-03-15 02:28:10 +01:00
services.tailscale.extraUpFlags = [ "--advertise-exit-node" ];
2024-03-15 12:41:29 +01:00
boot.kernel.sysctl = { "net.ipv4.ip_forward" = true; };
2024-03-15 02:28:10 +01:00
}