aboutsummaryrefslogtreecommitdiff
path: root/modules/services
diff options
context:
space:
mode:
authorCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2026-01-24 18:30:10 -0600
committerCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2026-01-24 18:30:10 -0600
commite5b58133c49d7c99f96de9f2354cd3f10ecbbf60 (patch)
tree9044c382ce4fe55d7008ac99339f1be807c09095 /modules/services
parent548806184d9f9ebeb8e4ee60722860e0085874d2 (diff)
more ssh config
Diffstat (limited to 'modules/services')
-rw-r--r--modules/services/nixos/selfhost/forgejo.nix4
-rw-r--r--modules/services/nixos/ssh.nix11
2 files changed, 6 insertions, 9 deletions
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"];