From 761687accbfc322924775ffb0f1b11ce686c9b44 Mon Sep 17 00:00:00 2001 From: Fern Garden Date: Wed, 2 Jul 2025 16:21:47 +0800 Subject: [PATCH 1/3] Cleanup --- hardware-configuration/muskduck.nix | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/hardware-configuration/muskduck.nix b/hardware-configuration/muskduck.nix index 367b9e3..d6505f9 100644 --- a/hardware-configuration/muskduck.nix +++ b/hardware-configuration/muskduck.nix @@ -1,7 +1,4 @@ -# 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, ... }: +{ config, lib, modulesPath, ... }: { imports = @@ -28,13 +25,7 @@ swapDevices = [ ]; - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; From 9b67203d4e73c66e91bf7196360377a428b01a0e Mon Sep 17 00:00:00 2001 From: Fern Garden Date: Wed, 2 Jul 2025 16:21:56 +0800 Subject: [PATCH 2/3] add minecraft vm hardware config --- hardware-configuration/vm-minecraft.nix | 35 +++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 hardware-configuration/vm-minecraft.nix diff --git a/hardware-configuration/vm-minecraft.nix b/hardware-configuration/vm-minecraft.nix new file mode 100644 index 0000000..b6816e7 --- /dev/null +++ b/hardware-configuration/vm-minecraft.nix @@ -0,0 +1,35 @@ +{ lib, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/4d1a9488-acf2-456c-a435-cc96ecff8aba"; + fsType = "ext4"; + }; + + fileSystems."/home/docker/volumes" = + { device = "/dev/disk/by-uuid/e520aca6-6cad-483c-b855-f6409a8a6908"; + fsType = "ext2"; + }; + + fileSystems."/var/lib/docker" = + { device = "/dev/disk/by-uuid/fab223a4-78a1-4900-81a6-45d04325fdcf"; + fsType = "ext2"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/73916996-b863-4279-9fe5-ae2b3b773608"; } + ]; + + networking.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} \ No newline at end of file From 56a20fc1c8a981765684c13da9f5772f50f6ff05 Mon Sep 17 00:00:00 2001 From: Fern Garden Date: Wed, 2 Jul 2025 16:22:13 +0800 Subject: [PATCH 3/3] Rename hardware config in flake --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 1e5a2b2..188ff2a 100755 --- a/flake.nix +++ b/flake.nix @@ -50,7 +50,7 @@ ./configuration/common.nix ./configuration/vm.nix - ./hardware-configuration/vm.nix # Include the results of the hardware scan. + ./hardware-configuration/vm-minecraft.nix # Include the results of the hardware scan. ]; }; };