{ config, lib, pkgs, modulesPath, ... }: let main_disk = "/dev/disk/by-uuid/"; in { imports = [ (modulesPath + "/installer/scan/not-detected.nix") # TODO is this necessary? ]; boot = { initrd = { compressor = "lz4"; compressorArgs = ["-9"]; # TODO check this: availableKernelModules = ["xhci_pci" "nvme" "rtsx_pci_sdmmc"]; }; kernelModules = ["kvm-amd"]; kernelPackages = pkgs.linuxPackages_latest; loader = { grub = { enable = true; version = 2; theme = pkgs.nixos-grub2-theme; splashImage = ./grub_boot_image.png; efiSupport = true; device = "nodev"; # TODO add this }; efi = { canTouchEfiVariables = true; efiSysMountPoint = "/boot"; }; }; }; fileSystems = { "/" = { device = "none"; fsType = "tmpfs"; options = ["defaults" "size=2G" "mode=755"]; }; "/nix" = { device = main_disk; fsType = "btrfs"; options = ["subvol=@nix" "compress-force=zstd:9"]; }; "/boot" = { device = "/dev/disk/by-uuid/"; fsType = "vfat"; }; "/srv/home" = { device = main_disk; fsType = "btrfs"; options = ["subvol=@home" "compress-force=zstd:9"]; }; "/srv/nixos-config" = { device = main_disk; fsType = "btrfs"; options = ["subvol=@nixos-config" "compress-force=zstd:9"]; }; "/etc/nixos" = { device = "/srv/nix-config"; options = ["bind"]; }; "/home" = { device = "/srv/home"; options = ["bind"]; }; }; swapDevices = []; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; }