2023-04-17 02:23:56 +02:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
{
|
|
|
|
# Boot drives are defined in ./hardware-configuration.nix
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [ cifs-utils ];
|
|
|
|
|
|
|
|
# Local zfs
|
|
|
|
boot = {
|
|
|
|
zfs.extraPools = [ "tank" ];
|
|
|
|
supportedFilesystems = [ "zfs" ];
|
|
|
|
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
|
|
|
};
|
2024-03-07 23:11:06 +01:00
|
|
|
services.zfs.autoScrub = {
|
|
|
|
enable = true;
|
2024-03-10 14:27:58 +01:00
|
|
|
interval = "Wed *-*-8..14 00:00:00";
|
2024-03-07 23:11:06 +01:00
|
|
|
};
|
2023-04-17 02:23:56 +02:00
|
|
|
|
|
|
|
# Network mounts (import)
|
|
|
|
fileSystems = {
|
|
|
|
"/mnt/feal-syn1/media" = {
|
|
|
|
device = "feal-syn1.home.feal.no:/volume2/media";
|
|
|
|
fsType = "nfs";
|
|
|
|
options = [ "vers=3" ];
|
|
|
|
#options = [ "x-systemd.automount" "noauto" ];
|
|
|
|
};
|
|
|
|
"/mnt/feal-syn1/nfs_proxmox" = {
|
|
|
|
device = "//feal-syn1.home.feal.no/nfs_proxmox";
|
|
|
|
fsType = "cifs";
|
|
|
|
options = let
|
|
|
|
# this line prevents hanging on network split
|
|
|
|
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
|
|
|
|
|
|
|
|
in ["${automount_opts},credentials=/etc/feal-syn1-credentials"];
|
|
|
|
};
|
2023-05-03 17:49:50 +02:00
|
|
|
|
|
|
|
"/var/backup" = {
|
|
|
|
device = "/tank/backup/voyager";
|
|
|
|
options = [ "bind "];
|
|
|
|
};
|
2023-04-17 02:23:56 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|