Migrate exoplasim to flakes

This commit is contained in:
Vili Sinervä 2025-06-05 00:25:36 +03:00
parent c6add0f9f8
commit 948ab97bc3
Signed by: Vili Sinervä
SSH key fingerprint: SHA256:FladqYjaE4scJY3Hi+gnShZ6ygnTJgixy0I6BAoHyos
2 changed files with 43 additions and 6 deletions

View file

@ -5,12 +5,13 @@
... ...
}: }:
{ {
imports = [ ../../shared/base.nix ]; imports = [
../../shared/base.nix
../../shared/hardware/vm.nix
];
# Networking conf including WireGuard # Networking conf including WireGuard
networking = { networking = {
hostName = "exoplasim";
firewall.allowedUDPPorts = [ 51821 ]; firewall.allowedUDPPorts = [ 51821 ];
wg-quick.interfaces = { wg-quick.interfaces = {
@ -68,7 +69,4 @@
memory.swap_pos = "beside"; memory.swap_pos = "beside";
}; };
}; };
# HARDWARE SPECIFIC
services.qemuGuest.enable = true;
} }

39
hosts/exoplasim/state.nix Normal file
View file

@ -0,0 +1,39 @@
{ lib, modulesPath, ... }:
{
system.stateVersion = "24.05";
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [
"uhci_hcd"
"ehci_pci"
"ahci"
"virtio_pci"
"virtio_scsi"
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/17b26343-39c9-4598-97c0-b43aab7ed3a0";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/9F45-5FDF";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}