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 0000000..c171e28 Binary files /dev/null and b/secrets/samba-ugent.age differ 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 ]; }