From dfca783211634fe7fa18b9286256d78b2766e7f6 Mon Sep 17 00:00:00 2001 From: coolneng Date: Thu, 27 Jan 2022 00:29:15 +0100 Subject: [PATCH] Configure UGent samba share --- configuration.nix | 1 + modules/datasync.nix | 15 +++++++++++++++ secrets/samba-ugent.age | Bin 0 -> 332 bytes secrets/secrets.nix | 1 + 4 files changed, 17 insertions(+) create mode 100644 secrets/samba-ugent.age diff --git a/configuration.nix b/configuration.nix index dd45f2c..6828adb 100644 --- a/configuration.nix +++ b/configuration.nix @@ -94,6 +94,7 @@ with pkgs; age = { secrets.wireguard.file = secrets/wireguard.age; secrets.syncthing.file = secrets/syncthing.age; + secrets.samba-ugent.file = secrets/samba-ugent.age; identityPaths = [ "/etc/ssh/id_ed25519" ]; }; diff --git a/modules/datasync.nix b/modules/datasync.nix index 08f7c8b..2ed4ce6 100644 --- a/modules/datasync.nix +++ b/modules/datasync.nix @@ -74,4 +74,19 @@ }; }; }; + + # Samba configuration + fileSystems."/ugent" = { + device = "//files.ugent.be/akasroua"; + fsType = "cifs"; + options = let + automount_opts = + "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"; + credentials = config.age.secrets.samba-ugent.path; + + in [ + "${automount_opts},credentials=${credentials},noperm,vers=3.0,sec=ntlmv2i" + ]; + }; + } diff --git a/secrets/samba-ugent.age b/secrets/samba-ugent.age new file mode 100644 index 0000000000000000000000000000000000000000..c171e28c464d4a855a0b70bebb4a689bf81a681e GIT binary patch literal 332 zcmV-S0ki&LXJsvAZewzJaCB*JZZ2SPdXm=o3 zPEJU5MMzFbb!AyfV|HmycxrDnN=R`uGg)YGMsqW6Ok!znLRK$WNKFb=GIlghSvGBC zZ%cYFW>!mDaCA9XIZ#o0Lt$!3ZBJuqQCdcHQ+H!aMKB62J|HS2O)Y0~Wnpt=AX_d* zWD0LjQAILZWOXrkZb(@{dSx(kFLrNXG&OigZwf6fEg*DeWJ7U7R(CIBWHT#MHZ)o` zRBCxEcvfp^M>$hiOjR;8YGyM}Ml^0xQ3{rIZ3q>L36NE@tB(pu;0^+fexiT`tda;v zm)dZM1YHh?MJn|tL{}mILsNt`mPRghH>E5v?*Ncil-=gv`g5O7VqnNUUszmLF?Nr(`f{So?bOT$qCwPGX literal 0 HcmV?d00001 diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 29cb5d7..bdb192d 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -4,4 +4,5 @@ let in { "wireguard.age".publicKeys = [ coolneng ]; "syncthing.age".publicKeys = [ coolneng ]; + "samba-ugent.age".publicKeys = [ coolneng ]; }