zfs auto expand, scrub, and trim

This commit is contained in:
Joseph Hanson 2025-02-23 20:25:19 -06:00
parent c2004c61c7
commit d3d9e0fd1a
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o

View file

@ -1,5 +1,8 @@
{ pkgs, config, ... }:
{ {
pkgs,
config,
...
}: {
imports = [./resources/prune-backup.nix]; imports = [./resources/prune-backup.nix];
networking.hostId = "cdab8473"; networking.hostId = "cdab8473";
@ -30,11 +33,9 @@
device = "//u370253-sub2.your-storagebox.de/u370253-sub2"; device = "//u370253-sub2.your-storagebox.de/u370253-sub2";
fsType = "cifs"; fsType = "cifs";
options = options = let
let
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,vers=3"; automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,vers=3";
in in [
[
"${automount_opts},credentials=${config.sops.secrets.sambaCredentials.path},uid=994,gid=993" # evaluated and deployed from another machine "${automount_opts},credentials=${config.sops.secrets.sambaCredentials.path},uid=994,gid=993" # evaluated and deployed from another machine
]; ];
}; };
@ -51,6 +52,14 @@
}; };
}; };
services = {
zfs = {
expandOnBoot = "all";
autoScrub.enable = true;
trim.enable = true;
};
};
# System settings and services. # System settings and services.
mySystem = { mySystem = {
purpose = "Production"; purpose = "Production";