nixos-config/hardware/rpi4.nix

49 lines
1.3 KiB
Nix
Raw Normal View History

2020-09-27 14:27:25 +02:00
{ config, lib, pkgs, modulesPath, ... }:
{
boot.initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ];
2020-09-27 14:27:25 +02:00
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/7bb1e67d-8c6f-4ace-b8e7-b09cdfd82cab";
fsType = "btrfs";
options = [ "subvol=@" "compress-force=zstd:1" "noatime" ];
2020-09-27 18:44:17 +02:00
};
2020-09-27 14:27:25 +02:00
boot.initrd.luks.devices."enc".device =
"/dev/disk/by-uuid/d163376b-a038-4196-8ef5-7c7fb5508f0c";
fileSystems."/home" = {
device = "/dev/disk/by-uuid/7bb1e67d-8c6f-4ace-b8e7-b09cdfd82cab";
fsType = "btrfs";
options = [ "subvol=@home" "compress-force=zstd:1" "noatime" ];
2020-09-27 18:44:17 +02:00
};
2020-09-27 14:27:25 +02:00
fileSystems."/.swap" = {
device = "/dev/disk/by-uuid/7bb1e67d-8c6f-4ace-b8e7-b09cdfd82cab";
2021-03-13 12:51:16 +01:00
fsType = "btrfs";
options = [ "subvol=@swap" "nodatacow" "noatime" ];
neededForBoot = true;
2021-03-13 12:51:16 +01:00
};
fileSystems."/.snapshots" = {
device = "/dev/disk/by-uuid/7bb1e67d-8c6f-4ace-b8e7-b09cdfd82cab";
2021-03-13 12:51:16 +01:00
fsType = "btrfs";
options = [ "subvol=@snapshots" "compress-force=zstd:1" "noatime" ];
2021-03-13 12:51:16 +01:00
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/9ECA-C9A7";
fsType = "vfat";
};
2022-05-14 18:11:19 +02:00
swapDevices = [{
device = "/.swap/swapfile";
2022-05-14 18:11:19 +02:00
size = 4096;
}];
2020-09-27 14:27:25 +02:00
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
}