From 6c1acb5b9abda8f2365a4aa775994788c1516eb3 Mon Sep 17 00:00:00 2001 From: colin Date: Fri, 10 Jun 2022 00:38:02 -0700 Subject: [PATCH] fs: add uninsane lan mount also fix the gid (100 = users group) --- modules/universal/fs.nix | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/modules/universal/fs.nix b/modules/universal/fs.nix index e7c623b4b..0ada1f1b8 100644 --- a/modules/universal/fs.nix +++ b/modules/universal/fs.nix @@ -1,22 +1,31 @@ { pkgs, ... }: +let uninsane = { + fsType = "fuse.sshfs"; + options = [ + "x-systemd.automount" + "_netdev" + "user" + "idmap=user" + "transform_symlinks" + "identityfile=/home/colin/.ssh/id_ed25519" + "allow_other" + "default_permissions" + "uid=1000" + "gid=100" + ]; +}; +in { fileSystems."/mnt/media-uninsane" = { # device = "sshfs#colin@uninsane.org:/opt/uninsane/media"; device = "colin@uninsane.org:/opt/uninsane/media"; - fsType = "fuse.sshfs"; - options = [ - "x-systemd.automount" - "_netdev" - "user" - "idmap=user" - "transform_symlinks" - "identityfile=/home/colin/.ssh/id_ed25519" - "allow_other" - "default_permissions" - "uid=1000" - "gid=1000" - ]; + inherit (uninsane) fsType options; + }; + fileSystems."/mnt/media-uninsane-lan" = { + # device = "sshfs#colin@uninsane.org:/opt/uninsane/media"; + device = "colin@192.168.0.5:/opt/uninsane/media"; + inherit (uninsane) fsType options; }; environment.systemPackages = [ pkgs.sshfs-fuse