centralise SSH server configuration and differentiate by role
1 file changed, 3 insertions(+), 11 deletions(-)
changed files
M system/hosts/prefect.nix → system/hosts/prefect.nix
@@ -26,6 +26,9 @@ ../settings/programs/shell.nix ../settings/programs/docker.nix ../settings/dev.nix ../settings/gaming.nix + + ../roles/desktop.nix + ../roles/local-access.nix ]; virtualisation.vmVariant = {@@ -123,17 +126,6 @@ ]; services.xserver = { xautolock.enable = pkgs.lib.mkForce false; - }; - - services.openssh = { - enable = true; - openFirewall = false; - startWhenNeeded = true; - }; - systemd.services."ssh-no-sleep@" = { - bindsTo = [ "sshd@%i.service" ]; - wantedBy = [ "sshd@.service" ]; - serviceConfig.ExecStart = "${pkgs.systemd}/bin/systemd-inhibit --mode block --what sleep --who 'ssh session '%I --why 'session still active' ${pkgs.coreutils}/bin/sleep infinity"; }; networking = {