This commit is contained in:
2026-02-18 21:23:56 +01:00
commit 11ce3ba32f
41 changed files with 2422 additions and 0 deletions

58
nixos/hardware.nix Normal file
View File

@@ -0,0 +1,58 @@
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
# Bootloader
boot = {
kernelPackages = pkgs.linuxPackages_latest;
initrd.availableKernelModules = [
"ahci"
"xhci_pci"
"virtio_pci"
"virtio_scsi"
"sd_mod"
"sr_mod"
];
initrd.kernelModules = [ ];
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
# File systems
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
options = [ "noatime" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
# Swap
swapDevices = [
{
device = "/swapfile";
size = 4096;
}
];
# x86_64 hardware
hardware.enableRedistributableFirmware = true;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}