I have the following config in my ~/.config/home-manager/home.nix
{ pkgs, lib, config, security, ... }:
let
mountdir_testhost = "${config.home.homeDirectory}/cs/test";
in
{
...
systemd.user = {
mounts = {
mount-test = {
Unit = {
Description = "mount test home";
};
Mount = {
What="papanito@test.home:/home";
Where="${mountdir_testhost}";
Type="sshfs";
Options="x-systemd.automount,_netdev,reconnect,allow_other,identityfile=/home/papanito/.ssh/id_rsa";
#SloppyOptions=
#LazyUnmount=
#ReadWriteOnly=
#ForceUnmount=
#DirectoryMode=
#TimeoutSec=
};
};
};
};
}
and
$ home-manager switch
/nix/store/7rafw8v4snb3a168f0hw31qsd4yrish8-home-manager-generation
Starting Home Manager activation
Activating checkFilesChanged
Activating checkLinkTargets
Activating writeBoundary
Activating installPackages
replacing old 'home-manager-path'
installing 'home-manager-path'
Activating linkGeneration
Cleaning up orphan links from /home/papanito
No change so reusing latest profile generation 3
Creating home file links in /home/papanito
Activating onFilesChange
Activating reloadSystemd
But it seems it’s neither mounted nor is there any service which I could start. Not sure if I miss something or I do misunderstand the concept of mounting fileshares as user.