2024-07-07 04:15:42 +02:00
|
|
|
{ lib, modulesPath, hostname, ... }: {
|
2023-12-05 05:27:06 +01:00
|
|
|
imports = [
|
2023-12-05 14:01:33 +01:00
|
|
|
(modulesPath + "/profiles/qemu-guest.nix")
|
2024-01-12 08:43:50 +01:00
|
|
|
../../common/services/tailscale-autoconnect.nix
|
2023-12-06 11:23:29 +01:00
|
|
|
./firewall.nix
|
2024-07-07 08:19:50 +02:00
|
|
|
./wireguard.nix
|
2024-08-20 10:25:45 +02:00
|
|
|
../../common/services/docker.nix
|
2024-09-16 07:18:22 +02:00
|
|
|
(import ../../common/containers/derp.nix { domainName = "osaka.sysctl.io"; })
|
2023-12-05 05:27:06 +01:00
|
|
|
];
|
2023-12-05 14:01:33 +01:00
|
|
|
|
2023-12-13 03:56:02 +01:00
|
|
|
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];
|
2023-12-05 14:01:33 +01:00
|
|
|
boot.initrd.kernelModules = [ ];
|
|
|
|
boot.kernelModules = [ ];
|
|
|
|
boot.extraModulePackages = [ ];
|
|
|
|
|
2023-12-13 04:16:53 +01:00
|
|
|
# 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;
|
|
|
|
|
2023-12-05 14:01:33 +01:00
|
|
|
fileSystems."/" = {
|
|
|
|
device = "/dev/disk/by-label/nixos";
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
|
|
|
|
|
|
|
swapDevices = [ { device = "/dev/disk/by-label/linode-swap"; } ];
|
2023-12-05 05:27:06 +01:00
|
|
|
|
|
|
|
# Distributed Builds
|
|
|
|
nix.distributedBuilds = true;
|
|
|
|
|
|
|
|
networking.useDHCP = lib.mkDefault true;
|
|
|
|
time.timeZone = "Asia/Tokyo";
|
2024-07-07 04:15:42 +02:00
|
|
|
networking.hostName = hostname;
|
2023-12-05 05:27:06 +01:00
|
|
|
|
|
|
|
services.tailscale.extraUpFlags = [ "--advertise-exit-node" ];
|
2024-07-07 04:15:42 +02:00
|
|
|
boot.kernel.sysctl = { "net.ipv4.ip_forward" = true; };
|
2024-03-13 03:48:40 +01:00
|
|
|
}
|