From 011afecb6f8d67b23e6275cef6d18b32ad188547 Mon Sep 17 00:00:00 2001 From: poslop Date: Fri, 24 Apr 2026 17:35:33 -0500 Subject: [PATCH] goyplex-vm --- flake.nix | 9 +++++++ hosts/goyplex-vm/configuration.nix | 18 +++++++++++++ hosts/goyplex-vm/hardware-configuration.nix | 30 +++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 hosts/goyplex-vm/configuration.nix create mode 100644 hosts/goyplex-vm/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index 23d920f..0abdc0c 100644 --- a/flake.nix +++ b/flake.nix @@ -44,6 +44,15 @@ inherit self inputs username; }; }; + + goyplex-vm = nixpkgs.lib.nixosSystem { + inherit system; + modules = [ ./hosts/goyplex-vm/configuration.nix ]; + specialArgs = { + host = "goyplex-vm"; + inherit self inputs username; + }; + }; }; }; diff --git a/hosts/goyplex-vm/configuration.nix b/hosts/goyplex-vm/configuration.nix new file mode 100644 index 0000000..afc18d7 --- /dev/null +++ b/hosts/goyplex-vm/configuration.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: + +{ + imports = [ + ./hardware-configuration.nix + ../../modules + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + boot.kernelPackages = pkgs.linuxPackages_latest; + + services.spice-vdagentd.enable = true; + services.qemuGuest.enable = true; + + system.stateVersion = "25.11"; +} diff --git a/hosts/goyplex-vm/hardware-configuration.nix b/hosts/goyplex-vm/hardware-configuration.nix new file mode 100644 index 0000000..897045e --- /dev/null +++ b/hosts/goyplex-vm/hardware-configuration.nix @@ -0,0 +1,30 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + 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 = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/4a546e61-4a4d-4e09-8b00-3f56acc14ccb"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/C838-5FC2"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +}