2021-03-28 12:26:11 +00:00
|
|
|
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
{ lib, ... }:
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
../../../third_party/nixpkgs/nixos/modules/profiles/qemu-guest.nix
|
|
|
|
../lib/low-space.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
config = {
|
|
|
|
boot.initrd.availableKernelModules = [
|
|
|
|
"uhci_hcd"
|
|
|
|
"ehci_pci"
|
|
|
|
"ahci"
|
|
|
|
"virtio_pci"
|
|
|
|
"sr_mod"
|
|
|
|
"virtio_blk"
|
|
|
|
];
|
|
|
|
|
|
|
|
boot.kernelParams = [
|
|
|
|
"console=tty1"
|
|
|
|
"console=ttyS0,115200" # <-- /dev/console
|
|
|
|
|
|
|
|
"mitigations=off"
|
|
|
|
];
|
|
|
|
|
|
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
2021-08-30 18:58:21 +00:00
|
|
|
|
2021-03-28 12:26:11 +00:00
|
|
|
fileSystems = {
|
|
|
|
"/" = {
|
|
|
|
device = "/dev/vda1";
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
|
|
|
"/boot" = {
|
|
|
|
device = "/dev/vda2";
|
|
|
|
fsType = "vfat";
|
|
|
|
};
|
|
|
|
};
|
2021-08-30 18:58:21 +00:00
|
|
|
|
2021-03-28 12:26:11 +00:00
|
|
|
# Use the systemd-boot EFI boot loader.
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
2022-01-30 20:30:20 +00:00
|
|
|
nix.settings.max-jobs = lib.mkDefault 2;
|
2021-04-10 19:59:56 +00:00
|
|
|
|
|
|
|
my.rundeck.tags = [ "bvm" ];
|
2021-08-30 18:58:21 +00:00
|
|
|
|
2021-03-28 12:26:11 +00:00
|
|
|
# Networking!
|
|
|
|
networking = {
|
|
|
|
domain = "blade.as205479.net";
|
|
|
|
nameservers = ["8.8.8.8" "8.8.4.4"];
|
2021-03-28 12:32:01 +00:00
|
|
|
search = lib.mkBefore [
|
2021-03-28 12:26:11 +00:00
|
|
|
"blade.as205479.net"
|
|
|
|
];
|
|
|
|
|
2021-04-01 15:55:54 +00:00
|
|
|
defaultGateway = lib.mkDefault {
|
2021-03-28 12:26:11 +00:00
|
|
|
address = "10.100.0.1";
|
|
|
|
interface = "enp1s0";
|
|
|
|
};
|
2021-08-30 18:58:21 +00:00
|
|
|
|
2021-03-28 12:26:11 +00:00
|
|
|
firewall.allowedUDPPorts = [
|
|
|
|
41641 # Tailscale
|
|
|
|
];
|
|
|
|
};
|
2021-08-30 18:58:21 +00:00
|
|
|
|
2021-03-28 12:26:11 +00:00
|
|
|
services.qemuGuest.enable = true;
|
|
|
|
};
|
|
|
|
}
|