mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-12-11 17:31:58 +01:00
504c17a535
Signed-off-by: Magic_RB <magic_rb@redalder.org>
72 lines
1.5 KiB
Nix
72 lines
1.5 KiB
Nix
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
|
#
|
|
# SPDX-License-Identifier: LGPL-3.0-or-later
|
|
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
secret,
|
|
...
|
|
}:
|
|
with lib; let
|
|
cfg = config.magic_rb.hardware.deck;
|
|
kernel = pkgs.linuxKernel.packages.linux_xanmod_latest;
|
|
in {
|
|
options.magic_rb.hardware.deck = mkEnableOption "Enable deck.";
|
|
|
|
config = mkIf cfg {
|
|
boot = {
|
|
supportedFilesystems = ["zfs"];
|
|
zfs.enableUnstable = true;
|
|
|
|
initrd.availableKernelModules = [
|
|
"xhci_pci"
|
|
"ahci"
|
|
"usbhid"
|
|
"usb_storage"
|
|
"sd_mod"
|
|
"nvme"
|
|
];
|
|
initrd.kernelModules = ["dm-snapshot"];
|
|
kernelModules = ["i2c-dev" "kvm-amd"];
|
|
kernelParams = [
|
|
"zfs.zfs_arc_max=8589934592"
|
|
];
|
|
extraModulePackages = [];
|
|
kernelPackages = kernel;ws
|
|
};
|
|
|
|
hardware.firmware = singleton pkgs.firmwareLinuxNonfree;
|
|
|
|
# powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
|
|
|
fileSystems = {
|
|
"/" = {
|
|
device = "deck-zpool/local/root";
|
|
fsType = "zfs";
|
|
};
|
|
|
|
"/nix" = {
|
|
device = "deck-zpool/local/nix";
|
|
fsType = "zfs";
|
|
};
|
|
|
|
"/home" = {
|
|
device = "deck-zpool/safe/home";
|
|
fsType = "zfs";
|
|
};
|
|
|
|
"/boot" = {
|
|
device = "/dev/disk/by-uuid/5e590840-9e62-4231-8ac5-e6a27325254d";
|
|
fsType = "ext4";
|
|
};
|
|
|
|
"/boot/EFI" = {
|
|
device = "/dev/disk/by-uuid/D381-9D12";
|
|
fsType = "vfat";
|
|
};
|
|
};
|
|
|
|
swapDevices = [];
|
|
};
|
|
}
|