From 8d5f52de197338fa828a557383569754a165ee40 Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Thu, 4 Dec 2025 11:01:16 +0100 Subject: [PATCH] nixberry: automount share on yggdrasil --- modules/hosts/nixberry/disko.nix | 7 +++++-- modules/hosts/yggdrasil/default.nix | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/modules/hosts/nixberry/disko.nix b/modules/hosts/nixberry/disko.nix index e6b4640..9454548 100644 --- a/modules/hosts/nixberry/disko.nix +++ b/modules/hosts/nixberry/disko.nix @@ -59,8 +59,11 @@ boot.supportedFilesystems = [ "zfs" ]; networking.hostId = "8425e349"; - services.zfs.autoScrub.enable = true; - services.zfs.trim.enable = true; + services.zfs = { + autoScrub.enable = true; + autoSnapshot.enable = true; + trim.enable = true; + }; disko.devices = { disk = { diff --git a/modules/hosts/yggdrasil/default.nix b/modules/hosts/yggdrasil/default.nix index 0af842b..a72d886 100644 --- a/modules/hosts/yggdrasil/default.nix +++ b/modules/hosts/yggdrasil/default.nix @@ -63,6 +63,22 @@ topLevel: { root ]; + fileSystems."/mnt/pi_share" = { + device = "cholli@nixberry:/storage/"; + fsType = "sshfs"; + + options = [ + # Filesystem options + "allow_other" # for non-root access + "_netdev" # this is a network fs + "x-systemd.automount" # mount on demand + + # SSH options + "reconnect" # handle connection drops + "ServerAliveInterval=15" # keep connections alive + ]; + }; + nix = { distributedBuilds = true; settings.builders-use-substitutes = true;