mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 16:21:34 +01:00
Enable forgejo ssh server
This commit is contained in:
parent
671ddf8233
commit
cb6570667b
2 changed files with 19 additions and 0 deletions
18
modules/system/services/forgejo/ssh.nix
Normal file
18
modules/system/services/forgejo/ssh.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.custom.services.forgejo.ssh.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.custom.services.forgejo.ssh.enable {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
AllowUsers = [ config.users.users.forgejo.name ];
|
||||
# https://forgejo.org/docs/latest/admin/recommendations/#git-over-ssh
|
||||
AcceptEnv = "GIT_PROTOCOL";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue