forgejo: fix ssh

really only a temporary solution for now, ideally we would do it so
only the forgejo user can use the .ssh/authorizedKeys file in their home
folder. but nix purity rules prevents that
This commit is contained in:
Nico 2025-05-03 16:16:04 +10:00
parent beb323e648
commit 66f036aee3

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
{ {
services.forgejo = { services.forgejo = {
@ -19,6 +19,11 @@
}; };
}; };
# forgejo has user keys under its own .ssh/authorizedKeys file.
# nix blocks me from using users.users.<name>.openssh.authorizedKeys.keyFiles
# in order to only allow that to the forgejo user as it has "/var"
services.openssh.authorizedKeysInHomedir = lib.mkForce true;
services.caddy.virtualHosts."git.${config.homelab.domain}" = { services.caddy.virtualHosts."git.${config.homelab.domain}" = {
useACMEHost = config.homelab.domain; useACMEHost = config.homelab.domain;
extraConfig = '' extraConfig = ''