skipper: refactor hardware module

This commit is contained in:
Adithya 2024-06-30 23:54:47 +05:30
parent 08a5cc019b
commit 8b0c28367b
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C
4 changed files with 40 additions and 43 deletions

View file

@ -2,26 +2,28 @@
, pkgs
, ...
}: {
imports = [ ./kernel.nix ./filesystem.nix ];
imports = [ ./filesystem.nix ];
boot = {
consoleLogLevel = 3;
kernelPackages = lib.mkDefault pkgs.linuxPackages_zen;
kernelParams = [ "quiet" ];
kernelModules = [ "kvm-intel" ];
kernel.sysctl = {
"vm.swappiness" = 10;
"vm.dirty_ratio" = 3;
};
initrd = {
luks.devices = {
luks0 = {
allowDiscards = true;
bypassWorkqueues = true;
device = "/dev/disk/by-partlabel/CRYPT";
preLVM = true;
availableKernelModules = [
"xhci_pci"
"thunderbolt"
"nvme"
"rtsx_pci_sdmmc"
];
kernelModules = [ "i915" "dm-snapshot" ];
systemd.enable = true;
};
};
supportedFilesystems = [ "vfat" "btrfs" ];
};
loader.efi.canTouchEfiVariables = true;
resumeDevice = "/dev/vg0/swap";
supportedFilesystems = [ "vfat" "ntfs" "exfat" "ext4" "btrfs" ];
};
swapDevices = [{ device = "/dev/vg0/swap"; }];
hardware = {
bluetooth = {
@ -50,4 +52,5 @@
steam-hardware.enable = true;
xone.enable = true;
};
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}

View file

@ -1,4 +1,19 @@
_: {
boot = {
initrd = {
supportedFilesystems = [ "vfat" "btrfs" ];
luks.devices = {
luks0 = {
allowDiscards = true;
bypassWorkqueues = true;
device = "/dev/disk/by-partlabel/CRYPT";
preLVM = true;
};
};
};
supportedFilesystems = [ "vfat" "ntfs" "exfat" "ext4" "btrfs" ];
resumeDevice = "/dev/vg0/swap";
};
fileSystems = {
"/" = {
device = "/dev/vg0/system";
@ -33,4 +48,6 @@ _: {
fsType = "vfat";
};
};
swapDevices = [{ device = "/dev/vg0/swap"; }];
}

View file

@ -1,26 +0,0 @@
{ lib
, pkgs
, ...
}: {
boot = {
consoleLogLevel = 3;
initrd = {
availableKernelModules = [
"xhci_pci"
"thunderbolt"
"nvme"
"rtsx_pci_sdmmc"
];
kernelModules = [ "i915" "dm-snapshot" ];
systemd.enable = true;
};
kernelModules = [ "kvm-intel" ];
kernelPackages = lib.mkDefault pkgs.linuxPackages_zen;
kernelParams = [ "quiet" ];
kernel.sysctl = {
"vm.swappiness" = 10;
"vm.dirty_ratio" = 3;
};
};
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}

View file

@ -8,7 +8,10 @@
};
boot = {
bootspec.enable = true;
loader.systemd-boot.enable = lib.mkForce false;
loader = {
efi.canTouchEfiVariables = true;
systemd-boot.enable = lib.mkForce false;
};
lanzaboote = {
enable = true;
pkiBundle = "/persist/secrets/secureboot";