Refactor nixos-pulse filesystems

This commit is contained in:
Tristan D. 2024-01-24 19:54:48 +01:00
parent 13ff6229cb
commit acb9c2e974
Signed by: tristan
SSH key fingerprint: SHA256:U7y6eMb7CQDaTHv9XoX6/BaQnPqyxxKc+Xnfcefi6rY

View file

@ -109,34 +109,34 @@
let let
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"; automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
perm_opts = "uid=1000,gid=100"; perm_opts = "uid=1000,gid=100";
cifs_opts = "vers=2.0,credentials=/home/tristand/.smb-secrets"; smb_opts = [
mount_opts = "${automount_opts},${perm_opts},${cifs_opts}"; "vers=2.0,credentials=/home/tristand/.smb-secrets"
perm_opts
automount_opts
];
sshfs_opts = [
"allow_other,_netdev,reconnect,ServerAliveInterval=15,IdentityFile=/var/secrets/id_ed25519"
perm_opts
automount_opts
];
in in
{ {
"/mnt/ServerF" = { "/mnt/ServerF" = {
# device = "//srv-nas-01.local/Server_F"; # device = "//srv-nas-01.local/Server_F";
device = "//192.168.0.1/Server_F"; device = "//192.168.0.1/Server_F";
fsType = "cifs"; fsType = "cifs";
options = [ mount_opts ]; options = smb_opts;
}; };
"/mnt/Scans" = { "/mnt/Scans" = {
# device = "//srv-nas-01.local/Server_F"; # device = "//srv-nas-01.local/Server_F";
device = "//192.168.0.1/Scans"; device = "//192.168.0.1/Scans";
fsType = "cifs"; fsType = "cifs";
options = [ mount_opts ]; options = smb_opts;
}; };
"/mnt/media_v2" = { "/mnt/media_v2" = {
device = "root@23.88.68.113:/media_v2"; device = "root@23.88.68.113:/media_v2";
fsType = "sshfs"; fsType = "sshfs";
options = [ options = sshfs_opts;
automount_opts
perm_opts
"allow_other"
"_netdev"
"reconnect"
"ServerAliveInterval=15"
"IdentityFile=/var/secrets/id_ed25519"
];
}; };
}; };
system.fsPackages = [ pkgs.sshfs ]; system.fsPackages = [ pkgs.sshfs ];