dotfiles/nixos/boxes/bolty/default.nix

68 lines
1.4 KiB
Nix
Raw Normal View History

2022-12-19 09:09:08 +00:00
{
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
./home-assistant.nix
2021-10-30 10:22:04 +01:00
./matrix-server.nix
./nix-store-server.nix
2022-04-09 12:01:03 +01:00
./print-server.nix
./restic-server.nix
2021-10-01 10:06:37 +01:00
];
2022-12-19 09:09:08 +00:00
boot.binfmt.emulatedSystems = ["aarch64-linux"];
2022-12-12 19:41:11 +00:00
programs.ccache.enable = true;
2021-10-01 10:06:37 +01:00
networking = {
hostName = "bolty";
useDHCP = false;
defaultGateway = {
address = "10.0.0.1";
interface = "${bridgeInterface}";
};
2022-12-19 09:09:08 +00:00
nameservers = ["91.239.100.100" "89.233.43.71" "1.1.1.1"];
interfaces = {
"${physicalInterface}" = {
useDHCP = false;
wakeOnLan.enable = true;
};
"${bridgeInterface}" = {
2022-12-19 09:09:08 +00:00
ipv4.addresses = [
{
"address" = "10.0.0.8";
"prefixLength" = 24;
}
];
};
};
2022-12-19 09:09:08 +00:00
bridges = {"${bridgeInterface}".interfaces = ["${physicalInterface}"];};
2021-10-01 10:06:37 +01:00
};
2022-12-19 09:09:08 +00:00
boot.kernelModules = ["kvm_amd"];
2022-11-09 21:16:45 +00:00
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
];
2022-12-19 09:09:08 +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";
}