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,6 +1,9 @@
{ pkgs, config, ... }:
{ {
imports = [ ./resources/prune-backup.nix ]; pkgs,
config,
...
}: {
imports = [./resources/prune-backup.nix];
networking.hostId = "cdab8473"; networking.hostId = "cdab8473";
networking.hostName = "varda"; # Define your hostname. networking.hostName = "varda"; # Define your hostname.
@ -30,17 +33,15 @@
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
];
}; };
}; };
swapDevices = [ ]; swapDevices = [];
# sops # sops
sops = { sops = {
@ -51,10 +52,18 @@
}; };
}; };
services = {
zfs = {
expandOnBoot = "all";
autoScrub.enable = true;
trim.enable = true;
};
};
# System settings and services. # System settings and services.
mySystem = { mySystem = {
purpose = "Production"; purpose = "Production";
system.motd.networkInterfaces = [ "enp1s0" ]; system.motd.networkInterfaces = ["enp1s0"];
security.acme.enable = true; security.acme.enable = true;
services = { services = {
forgejo = { forgejo = {