dotfiles/nixos/boxes/bolty/default.nix

60 lines
1.3 KiB
Nix
Raw Normal View History

{ config, pkgs, inputs, lib, ... }:
let
physicalInterface = "enp4s0";
bridgeInterface = "br0";
in {
2021-10-01 10:06:37 +01:00
imports = [
./bolty-boot.nix
./real-hardware.nix
../cli.nix
2021-10-30 10:22:04 +01:00
./matrix-server.nix
2022-04-09 12:01:03 +01:00
./print-server.nix
./restic-server.nix
2022-08-28 08:28:54 +01:00
./home-assistant.nix
2021-10-01 10:06:37 +01:00
];
2022-03-02 11:59:09 +00:00
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
2021-10-01 10:06:37 +01:00
networking = {
hostName = "bolty";
useDHCP = false;
defaultGateway = {
address = "10.0.0.1";
interface = "${bridgeInterface}";
};
nameservers = [ "91.239.100.100" "89.233.43.71" "1.1.1.1" ];
interfaces = {
"${physicalInterface}" = {
useDHCP = false;
wakeOnLan.enable = true;
};
"${bridgeInterface}" = {
ipv4.addresses = [{
"address" = "10.0.0.8";
"prefixLength" = 24;
}];
};
};
bridges = { "${bridgeInterface}".interfaces = [ "${physicalInterface}" ]; };
2021-10-01 10:06:37 +01:00
};
2022-11-09 21:16:45 +00:00
boot.kernelModules = [ "kvm_amd" ];
virtualisation = {
libvirtd = {
enable = true;
qemu.ovmf.enable = true;
};
};
environment.systemPackages = with pkgs; [
qemu
virt-manager
usbutils
virt-viewer
2022-12-09 08:30:15 +00:00
lm_sensors
2022-11-09 21:16:45 +00:00
];
networking.firewall.allowedTCPPorts = [ 5900 ];
2021-10-01 10:06:37 +01:00
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
security.allowUserNamespaces = true;
time.timeZone = "Europe/London";
}