# 0x29a nixos hardware configuration { config, lib, pkgs, modulesPath, ... }: { imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; # boot and initrd configs boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; boot.initrd.kernelModules = [ "dm-snapshot" "cryptd" ]; boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-label/nixcrypt"; # file systems fileSystems."/" = { device = "/dev/disk/by-label/nixroot"; fsType = "ext4"; }; fileSystems."/boot" = { device = "/dev/disk/by-label/nixboot"; fsType = "vfat"; options = [ "fmask=0022" "dmask=0022" ]; }; fileSystems."/home" = { device = "/dev/disk/by-label/nixhome"; fsType = "ext4"; }; swapDevices = [ { device = "/dev/disk/by-label/nixswap"; } ]; # enable dhcp on all interfaces networking.useDHCP = lib.mkDefault true; # set host arch nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; }