Add config for fstrim

This commit is contained in:
June 2023-09-14 20:09:51 +02:00
parent 32c549447d
commit 5bfa655d3e
2 changed files with 11 additions and 0 deletions

10
config/common/storage.nix Normal file
View file

@ -0,0 +1,10 @@
# Common storage configuration.
# Sources for this configuration:
# - https://git.grzb.de/yuri/nix-infra/-/blob/aa38daeea59f2ca12b7e591de6f8b61565780c48/configuration/common/default.nix#L73
{ config, pkgs, ... }:
{
# Enable periodic SSD TRIM on mounted paritions in the background.
services.fstrim.enable = true;
}

View file

@ -11,6 +11,7 @@
boot = "order=virtio0"; boot = "order=virtio0";
cores = 2; cores = 2;
memory = 512; memory = 512;
virtio0 = "rpool-data:vm-9999-disk-0,discard=on";
bios = "seabios"; bios = "seabios";
net0 = "virtio=00:00:00:00:00:00,bridge=vmbr0,firewall=1,tag=999"; net0 = "virtio=00:00:00:00:00:00,bridge=vmbr0,firewall=1,tag=999";
}; };