62 lines
1.6 KiB
Nix
62 lines
1.6 KiB
Nix
{ config, lib, pkgs, modulesPath, ... }:
|
|
|
|
let
|
|
subvolume = {
|
|
device = "/dev/disk/by-uuid/6a0d25d4-0253-4467-85cc-ab3e0ef71f54";
|
|
fsType = "btrfs";
|
|
};
|
|
in
|
|
|
|
{
|
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
|
|
|
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ];
|
|
boot.initrd.kernelModules = [ ];
|
|
boot.kernelModules = [ "kvm-intel" ];
|
|
boot.extraModulePackages = [ ];
|
|
|
|
boot.initrd.luks.devices."cryptroot" = {
|
|
device = "/dev/disk/by-uuid/eaad533f-8586-4002-9c53-5aecf8e7abd8";
|
|
allowDiscards = true;
|
|
};
|
|
|
|
fileSystems."/" = subvolume // {
|
|
options = [ "subvol=root" "compress=zstd" "discard=async" ];
|
|
};
|
|
|
|
# the following subvolumes are automatically mounted and won't be snapshotted:
|
|
# /home/till/.local/share/Steam
|
|
# /home/till/.cache
|
|
# /home/till/tmp
|
|
|
|
# todo:
|
|
# /home/till/.mozilla/firefox
|
|
# /home/till/.config/Mattermost/Cache
|
|
|
|
fileSystems."/nix" = subvolume // {
|
|
options = [ "subvol=nix" "compress=zstd" "noatime" "discard=async" ];
|
|
};
|
|
|
|
fileSystems."/home" = subvolume // {
|
|
options = [ "subvol=home" "compress=zstd" "discard=async" ];
|
|
};
|
|
|
|
fileSystems."/boot" = {
|
|
device = "/dev/disk/by-uuid/7362-C4C4";
|
|
fsType = "vfat";
|
|
};
|
|
|
|
swapDevices = [{
|
|
device = "/swapfile";
|
|
size = 8 * 1045;
|
|
}];
|
|
|
|
networking.useDHCP = lib.mkDefault true;
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
hardware.trackpoint.enable = true;
|
|
boot.kernelParams = [ "psmouse.elantech_smbus=0" ];
|
|
|
|
}
|