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,27 +2,29 @@
, pkgs , pkgs
, ... , ...
}: { }: {
imports = [ ./kernel.nix ./filesystem.nix ]; imports = [ ./filesystem.nix ];
boot = { boot = {
initrd = { consoleLogLevel = 3;
luks.devices = { kernelPackages = lib.mkDefault pkgs.linuxPackages_zen;
luks0 = { kernelParams = [ "quiet" ];
allowDiscards = true; kernelModules = [ "kvm-intel" ];
bypassWorkqueues = true; kernel.sysctl = {
device = "/dev/disk/by-partlabel/CRYPT"; "vm.swappiness" = 10;
preLVM = true; "vm.dirty_ratio" = 3;
}; };
}; initrd = {
supportedFilesystems = [ "vfat" "btrfs" ]; availableKernelModules = [
"xhci_pci"
"thunderbolt"
"nvme"
"rtsx_pci_sdmmc"
];
kernelModules = [ "i915" "dm-snapshot" ];
systemd.enable = true;
}; };
loader.efi.canTouchEfiVariables = true;
resumeDevice = "/dev/vg0/swap";
supportedFilesystems = [ "vfat" "ntfs" "exfat" "ext4" "btrfs" ];
}; };
swapDevices = [{ device = "/dev/vg0/swap"; }];
hardware = { hardware = {
bluetooth = { bluetooth = {
enable = true; enable = true;
@ -50,4 +52,5 @@
steam-hardware.enable = true; steam-hardware.enable = true;
xone.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 = { fileSystems = {
"/" = { "/" = {
device = "/dev/vg0/system"; device = "/dev/vg0/system";
@ -33,4 +48,6 @@ _: {
fsType = "vfat"; 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 = { boot = {
bootspec.enable = true; bootspec.enable = true;
loader.systemd-boot.enable = lib.mkForce false; loader = {
efi.canTouchEfiVariables = true;
systemd-boot.enable = lib.mkForce false;
};
lanzaboote = { lanzaboote = {
enable = true; enable = true;
pkiBundle = "/persist/secrets/secureboot"; pkiBundle = "/persist/secrets/secureboot";