forgejo: setup
This commit is contained in:
parent
39433f7488
commit
6c09df8fa0
|
@ -8,11 +8,9 @@ in
|
||||||
environment.systemPackages = mkIf config.profile.podman.enable [
|
environment.systemPackages = mkIf config.profile.podman.enable [
|
||||||
(pkgs.callPackage ../packages/cockpit-podman.nix { })
|
(pkgs.callPackage ../packages/cockpit-podman.nix { })
|
||||||
];
|
];
|
||||||
sops.secrets."cockpit" = {
|
services.caddy.virtualHosts."cockpit.tigor.web.id".extraConfig = ''
|
||||||
sopsFile = ../../secrets/caddy_reverse_proxy.yaml;
|
reverse_proxy 0.0.0.0:9090
|
||||||
path = "/etc/caddy/sites-enabled/cockpit";
|
'';
|
||||||
mode = "0440";
|
|
||||||
};
|
|
||||||
services.cockpit = {
|
services.cockpit = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./caddy.nix
|
./caddy.nix
|
||||||
./cockpit.nix
|
./cockpit.nix
|
||||||
|
./forgejo.nix
|
||||||
./samba.nix
|
./samba.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,18 +5,28 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
sops.secrets."forgejo" = {
|
services.caddy.virtualHosts."git.tigor.web.id".extraConfig = ''
|
||||||
sopsFile = ../../secrets/caddy_reverse_proxy.yaml;
|
reverse_proxy * unix//run/forgejo/forgejo.sock
|
||||||
path = "/etc/caddy/sites-enabled/forgejo";
|
'';
|
||||||
mode = "0440";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.forgejo = {
|
services.forgejo = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
server.PROTOCOL = "http+unix";
|
server = {
|
||||||
|
PROTOCOL = "http+unix";
|
||||||
|
SSH_PORT = 2222;
|
||||||
|
DOMAIN = "git.tigor.web.id";
|
||||||
|
HTTP_PORT = 443;
|
||||||
|
ROOT_URL = "https://${config.services.forgejo.settings.server.DOMAIN}:${toString config.services.forgejo.settings.server.HTTP_PORT}";
|
||||||
|
};
|
||||||
|
service = {
|
||||||
|
DISABLE_REGISTRATION = true;
|
||||||
|
};
|
||||||
session.COOKIE_SECURE = true;
|
session.COOKIE_SECURE = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ config.services.forgejo.settings.server.SSH_PORT ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue