From a084d8c3dcd4a089eae8669fd8ce5fa71b26f223 Mon Sep 17 00:00:00 2001 From: Miran Bastaja Date: Sat, 19 Oct 2024 21:49:53 +0200 Subject: sagittarius: set up cifs mount to storage box --- hosts/sagittarius/default.nix | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'hosts/sagittarius/default.nix') diff --git a/hosts/sagittarius/default.nix b/hosts/sagittarius/default.nix index c0c7f32..9cfb84b 100644 --- a/hosts/sagittarius/default.nix +++ b/hosts/sagittarius/default.nix @@ -1,4 +1,9 @@ -{ config, ... }: +{ + pkgs, + lib, + config, + ... +}: { imports = [ # Include the results of the hardware scan. @@ -12,6 +17,26 @@ boot.loader.grub.device = "/dev/sda"; time.timeZone = "Europe/Helsinki"; + environment.systemPackages = [ pkgs.cifs-utils ]; + fileSystems."/mnt/storage-box" = { + device = "//u423859-sub3.your-storagebox.de/u423859-sub3"; + fsType = "cifs"; + options = + let + opts = lib.concatStringsSep "," [ + "x-systemd.automount" + "noauto" + "x-systemd.idle-timeout=60" + "x-systemd.device-timeout=5s" + "x-systemd.mount-timeout=5s" + "credentials=${config.sops.secrets.samba-creds.path}" + ]; + in + # No clue whether doing it like this is neccessary, but the wiki does it + # like this + [ opts ]; + }; + networking = { hostName = "sagittarius"; useNetworkd = true; -- cgit v1.3.1