diff --git a/machines/nixos/web03/_configuration.nix b/machines/nixos/web03/_configuration.nix index 8976205..dccabb9 100644 --- a/machines/nixos/web03/_configuration.nix +++ b/machines/nixos/web03/_configuration.nix @@ -14,6 +14,7 @@ lib.extra.mkConfig { # List of services to enable "django-apps" "redirections" + "users-guests" ]; extraConfig = { diff --git a/machines/nixos/web03/users-guests.nix b/machines/nixos/web03/users-guests.nix new file mode 100644 index 0000000..20c084a --- /dev/null +++ b/machines/nixos/web03/users-guests.nix @@ -0,0 +1,29 @@ +# SPDX-FileCopyrightText: 2024 Tom Hubrecht +# +# SPDX-License-Identifier: EUPL-1.2 + +{ + boot.supportedFilesystems.sshfs = true; + + systemd.mounts = [ + { + what = "dgnum@sas.eleves.ens.fr:/users/guests/"; + type = "fuse.sshfs"; + where = "/users/guests"; + + after = [ "network-online.target" ]; + wants = [ "network-online.target" ]; + wantedBy = [ "default.target" ]; + options = builtins.concatStringsSep "," [ + # Filesystem options + "_netdev" + "allow_other" + "ro" + + # SSH options + "reconnect" + "IdentityFile=/etc/ssh/ssh_host_ed25519_key" + ]; + } + ]; +}