Re: [Nix-dev] systemd + sshfs

2016-09-19 Thread Bjørn Forsman
One problem remains. When the network is down, the generated mount unit (which systemd creates from parsing /etc/fstab) can easily enter failed state after a few failed mounts. And due to automatic dependencies, the automount unit becomes failed too. This is the problem. Without the automount servi

Re: [Nix-dev] systemd + sshfs

2016-09-19 Thread Bjørn Forsman
On 19 September 2016 at 15:04, Bjørn Forsman wrote: > [...] but GVFS really doesn't want to leave autofs filesystems alone. > It constantly tries to mount/activate them. And if the filesystem > cannot be mounted (network down) the systemd unit enters failed state > and users see will see the empty

Re: [Nix-dev] systemd + sshfs

2016-09-19 Thread Bjørn Forsman
Hi Rickard, On 18 September 2016 at 23:19, Rickard Nilsson wrote: > Hi Bjørn, > > I remember struggling with this too. The following works for me: > > fileSystems."/target" = > fsType = "fuse"; > device = "${pkgs.sshfsFuse}/bin/sshfs#user@host:/path"; > options = [ > "noauto" "comment=s

Re: [Nix-dev] systemd + sshfs

2016-09-18 Thread Rickard Nilsson
Hi Bjørn, I remember struggling with this too. The following works for me: fileSystems."/target" = fsType = "fuse"; device = "${pkgs.sshfsFuse}/bin/sshfs#user@host:/path"; options = [ "noauto" "comment=systemd.automount" "ssh_command=${sshAsUser}" ]; }; where sshAsUser = user