diff options
| -rw-r--r-- | flake.nix | 5 | ||||
| -rw-r--r-- | modules/services/nixos/selfhost/forgejo.nix | 4 | ||||
| -rw-r--r-- | modules/services/nixos/ssh.nix | 11 |
3 files changed, 8 insertions, 12 deletions
@@ -77,10 +77,9 @@ hostname = "mercury"; }; - deploy.nodes."ganymede" = { - hostname = "ganymede"; + deploy.nodes."ganymede-deploy" = { + hostname = "ganymede-deploy"; sshUser = "root"; - sshOpts = ["-o" "RequestTTY=force"]; profiles.system = { user = "root"; diff --git a/modules/services/nixos/selfhost/forgejo.nix b/modules/services/nixos/selfhost/forgejo.nix index 4571dca..1b02628 100644 --- a/modules/services/nixos/selfhost/forgejo.nix +++ b/modules/services/nixos/selfhost/forgejo.nix @@ -19,9 +19,9 @@ in START_SSH_SERVER = true; # use builtin ssh server BUILTIN_SSH_SERVER_USER = "git"; SSH_DOMAIN = "ganymede"; - SSH_PORT = 2222; # don't conflict with system ssh + SSH_PORT = 2225; # don't conflict with system ssh SSH_LISTEN_HOST = cfg.bind_host; - SSH_LISTEN_PORT = 2222; + SSH_LISTEN_PORT = 2225; }; service = { DISABLE_REGISTRATION = false; diff --git a/modules/services/nixos/ssh.nix b/modules/services/nixos/ssh.nix index 76b0d87..23f8fc5 100644 --- a/modules/services/nixos/ssh.nix +++ b/modules/services/nixos/ssh.nix @@ -73,13 +73,10 @@ in { |> (builtins.filter (x: x != null)); users.users."root".openssh.authorizedKeys.keys = - if config.services.openssh.settings.PermitRootLogin == "prohibit-password" - then - hosts - |> (builtins.mapAttrs (_: data: data.user_pubkey or null)) - |> builtins.attrValues - |> (builtins.filter (x: x != null)) - else {}; + hosts + |> (builtins.mapAttrs (_: data: data.user_pubkey or null)) + |> builtins.attrValues + |> (builtins.filter (x: x != null)); # only possible over home network (:2222) systemd.services."openssh" = lib.mkIf config.collinux.services.networking.networkd.enable { after = lib.mkAfter ["network-online.target"]; |
