Add swapfiles

This commit is contained in:
Benjamin Bädorf 2022-04-30 23:07:18 +02:00
parent 4de8f625fc
commit 39e2c7c1ee
No known key found for this signature in database
GPG key ID: 4406E80E13CD656C
2 changed files with 23 additions and 16 deletions

View file

@ -4,8 +4,7 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = imports = [
[
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
@ -14,21 +13,24 @@
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{
device = "/dev/disk/by-uuid/abc3fe04-368e-46eb-8c7a-3a829bb2deab"; device = "/dev/disk/by-uuid/abc3fe04-368e-46eb-8c7a-3a829bb2deab";
fsType = "ext4"; fsType = "ext4";
}; };
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/aed21f8d-8e15-4f43-8710-460cb36d488b"; boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/aed21f8d-8e15-4f43-8710-460cb36d488b";
fileSystems."/boot" = fileSystems."/boot" = {
{
device = "/dev/disk/by-uuid/3B67-0CAB"; device = "/dev/disk/by-uuid/3B67-0CAB";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [ ]; swapDevices = [
{
device = "/swapfile";
size = 18 * 1024; # 18 GB
}
];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
# high-resolution display # high-resolution display

View file

@ -28,6 +28,11 @@
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [ ]; swapDevices = [
{
device = "/swapfile";
size = 68 * 1024; # 68 GB
}
];
} }