mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 17:31: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
|
|
@ -29,6 +29,7 @@
|
||||||
forgejo = {
|
forgejo = {
|
||||||
enable = true;
|
enable = true;
|
||||||
domain = "git.sstork.dev";
|
domain = "git.sstork.dev";
|
||||||
|
ssh.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
caddy.virtualHosts = {
|
caddy.virtualHosts = {
|
||||||
|
|
|
||||||
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