My Nix Configuration
1{ pkgs, modulesPath, ... }: 2let 3 fileSystems = { 4 btrfs = true; 5 ext4 = true; 6 vfat = true; 7 }; 8in 9{ 10 imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; 11 boot = { 12 loader = { 13 grub.device = "/dev/sda"; 14 grub.enable = true; 15 }; 16 initrd = { 17 availableKernelModules = [ 18 "ata_piix" 19 "uhci_hcd" 20 "xen_blkfront" 21 "ahci" 22 "xhci_pci" 23 "virtio_pci" 24 "sd_mod" 25 "sr_mod" 26 ]; 27 kernelModules = [ "nvme" ]; 28 supportedFilesystems = fileSystems; 29 }; 30 supportedFilesystems = fileSystems; 31 kernelPackages = pkgs.linuxPackages_latest; 32 kernel.sysctl = { 33 "net.ipv4.ip_forward" = 1; 34 "net.ipv6.conf.all.forwarding" = 1; 35 "net.ipv4.conf.default.rp_filter" = 0; 36 "net.ipv4.conf.all.rp_filter" = 0; 37 }; 38 }; 39}