From 7fe4a329bf6cf10b8522bd6fde5cadecb38c868e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 6 May 2024 12:41:18 +0200 Subject: lipwig: access spt nas over SSH --- nixos/configurations/lipwig.nix | 15 +++++++++++++++ nixos/configurations/spt-omnia.nix | 5 ++++- 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'nixos') diff --git a/nixos/configurations/lipwig.nix b/nixos/configurations/lipwig.nix index 090e8f5..dd183b3 100644 --- a/nixos/configurations/lipwig.nix +++ b/nixos/configurations/lipwig.nix @@ -35,6 +35,21 @@ fsType = "fuse.bindfs"; options = ["map=syncthing/nextcloud:@syncthing/@nextcloud"]; }; + "/nas/spt" = { + device = "nas@omnia.spt:/data/nas"; + fsType = "fuse.sshfs"; + options = [ + "noauto" + "x-systemd.automount" + "_netdev" + "reconnect" + "identityfile=/run/secrets/nas.ssh.priv" + "allow_other" + "idmap=user" + "uid=nextcloud" + "gid=nextcloud" + ]; + }; }; networking = { diff --git a/nixos/configurations/spt-omnia.nix b/nixos/configurations/spt-omnia.nix index 22d9ecc..e11a29c 100644 --- a/nixos/configurations/spt-omnia.nix +++ b/nixos/configurations/spt-omnia.nix @@ -88,7 +88,10 @@ in { users = { nas = { group = "nas"; - openssh.authorizedKeys.keyFiles = [(config.personal-secrets + "/unencrypted/nas.pub")]; + openssh.authorizedKeys.keyFiles = [ + (config.personal-secrets + "/unencrypted/nas.pub") + (config.personal-secrets + "/unencrypted/nas-spt.pub") + ]; isNormalUser = true; home = "/data/nas"; homeMode = "770"; -- cgit v1.2.3