From 468eedf90143e0087ed83338aed9bd2e6c393b0a Mon Sep 17 00:00:00 2001 From: voidarc Date: Sat, 17 Oct 2026 14:40:32 +0100 Subject: [PATCH] added hardware config purely --- modules/system/_hardware-configuration.nix | 55 ++++++++++++++++++++++ modules/system/imports.nix | 2 +- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 modules/system/_hardware-configuration.nix diff --git a/modules/system/_hardware-configuration.nix b/modules/system/_hardware-configuration.nix new file mode 100644 index 0000000..c67685d --- /dev/null +++ b/modules/system/_hardware-configuration.nix @@ -0,0 +1,55 @@ +# 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 + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usbhid" + "usb_storage" + "sd_mod" + ]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-amd"]; + boot.extraModulePackages = []; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/7e9a351d-22a4-44dc-a29e-317a8bf5d346"; + fsType = "ext4"; + }; + + fileSystems."/home/user01/Tank" = { + device = "/dev/disk/by-uuid/26739c9c-da0a-4fc3-9958-cb2d4a4eff13"; + fsType = "ext4"; + options = [ + "defaults" + "user" + "rw" + "exec" + ]; + }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/7A34-CD26"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + swapDevices = []; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/modules/system/imports.nix b/modules/system/imports.nix index 7b96c91..2edf636 100644 --- a/modules/system/imports.nix +++ b/modules/system/imports.nix @@ -1,7 +1,7 @@ {...}: { flake.nixosModules.imports = {...}: { imports = [ - /etc/nixos/hardware-configuration.nix + ./_hardware-configuration.nix ]; }; }