From fd2bd70f243ac353b3729f60730c8fc149d44cb4 Mon Sep 17 00:00:00 2001 From: Paul-Henri Froidmont Date: Wed, 4 Mar 2020 18:24:47 +0100 Subject: [PATCH] Add samba mounts to work-laptop --- hosts/work-laptop/configuration.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/hosts/work-laptop/configuration.nix b/hosts/work-laptop/configuration.nix index d8f4320..e4ad253 100644 --- a/hosts/work-laptop/configuration.nix +++ b/hosts/work-laptop/configuration.nix @@ -61,5 +61,30 @@ }; # Enable touchpad support. services.xserver.libinput.enable = true; + + fileSystems."/home/froidmpa/Projectlib" = { + device = "//fs-common.aris-lux.lan/projectlib"; + 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/nixos/smb-secrets"]; + }; + fileSystems."/home/froidmpa/Projectlib2" = { + device = "//fs-projects.aris-lux.lan/projectlib2"; + 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/nixos/smb-secrets"]; + }; + fileSystems."/home/froidmpa/NetworkDrive" = { + device = "//fs-users.aris-lux.lan/users/froidmpa"; + 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/nixos/smb-secrets"]; + }; }