zfs auto expand, scrub, and trim
This commit is contained in:
parent
c2004c61c7
commit
d3d9e0fd1a
1 changed files with 20 additions and 11 deletions
|
@ -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";
|
||||||
|
|
Loading…
Add table
Reference in a new issue