82 lines
1.8 KiB
Nix
82 lines
1.8 KiB
Nix
{ config, lib, pkgs, modulesPath, ... }:
|
|
|
|
{
|
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
|
|
|
boot = {
|
|
lanzaboote = {
|
|
enable = true;
|
|
pkiBundle = "/etc/secureboot";
|
|
};
|
|
loader.efi.canTouchEfiVariables = true;
|
|
initrd = {
|
|
availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
|
kernelModules = [ "i915" ];
|
|
};
|
|
kernelModules = [ "kvm-intel" ];
|
|
extraModulePackages = [ ];
|
|
kernel.sysctl = {
|
|
"vm.swappiness" = 1;
|
|
};
|
|
};
|
|
|
|
chvp.base.zfs.systemLinks = [{ path = "/etc/secureboot"; type = "cache"; }];
|
|
|
|
# For Secure Boot management
|
|
environment.systemPackages = [ pkgs.sbctl ];
|
|
|
|
fileSystems."/" = {
|
|
device = "rpool/local/root";
|
|
fsType = "zfs";
|
|
neededForBoot = true;
|
|
};
|
|
|
|
fileSystems."/nix" = {
|
|
device = "rpool/local/nix";
|
|
fsType = "zfs";
|
|
neededForBoot = true;
|
|
};
|
|
|
|
fileSystems."/nix/store" = {
|
|
device = "rpool/local/nix-store";
|
|
fsType = "zfs";
|
|
neededForBoot = true;
|
|
};
|
|
|
|
fileSystems."/cache" = {
|
|
device = "rpool/local/cache";
|
|
fsType = "zfs";
|
|
neededForBoot = true;
|
|
};
|
|
|
|
fileSystems."/data" = {
|
|
device = "rpool/safe/data";
|
|
fsType = "zfs";
|
|
neededForBoot = true;
|
|
};
|
|
|
|
fileSystems."/boot" = {
|
|
device = "/dev/disk/by-uuid/CFDD-B4A6";
|
|
fsType = "vfat";
|
|
};
|
|
|
|
swapDevices = [
|
|
{ device = "/dev/disk/by-label/swap"; }
|
|
];
|
|
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
|
hardware = {
|
|
cpu.intel.updateMicrocode = true;
|
|
enableRedistributableFirmware = true;
|
|
graphics = {
|
|
enable = true;
|
|
extraPackages = with pkgs; [
|
|
vaapiIntel
|
|
vaapiVdpau
|
|
libvdpau-va-gl
|
|
intel-media-driver
|
|
];
|
|
};
|
|
};
|
|
services.fstrim.enable = true;
|
|
}
|