diff --git a/hosts/exoplasim/configuration.nix b/hosts/exoplasim/configuration.nix index ac7bbf0..9a17b8f 100644 --- a/hosts/exoplasim/configuration.nix +++ b/hosts/exoplasim/configuration.nix @@ -5,12 +5,13 @@ ... }: { - imports = [ ../../shared/base.nix ]; + imports = [ + ../../shared/base.nix + ../../shared/hardware/vm.nix + ]; # Networking conf including WireGuard networking = { - hostName = "exoplasim"; - firewall.allowedUDPPorts = [ 51821 ]; wg-quick.interfaces = { @@ -68,7 +69,4 @@ memory.swap_pos = "beside"; }; }; - - # HARDWARE SPECIFIC - services.qemuGuest.enable = true; } diff --git a/hosts/exoplasim/state.nix b/hosts/exoplasim/state.nix new file mode 100644 index 0000000..c8ead4b --- /dev/null +++ b/hosts/exoplasim/state.nix @@ -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"; +}