2024-06-13 13:52:45 +07:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.profile.services.cockpit;
|
2024-06-13 14:04:10 +07:00
|
|
|
inherit (lib) mkIf;
|
2024-06-13 13:52:45 +07:00
|
|
|
in
|
|
|
|
{
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = mkIf config.profile.podman.enable [
|
|
|
|
(pkgs.callPackage ../packages/cockpit-podman.nix { })
|
|
|
|
];
|
2024-06-13 18:59:07 +07:00
|
|
|
services.caddy.virtualHosts."cockpit.tigor.web.id".extraConfig = ''
|
|
|
|
reverse_proxy 0.0.0.0:9090
|
|
|
|
'';
|
2024-06-13 13:52:45 +07:00
|
|
|
services.cockpit = {
|
|
|
|
enable = true;
|
|
|
|
openFirewall = true;
|
|
|
|
settings = {
|
|
|
|
WebService = {
|
|
|
|
AllowUnencrypted = true;
|
|
|
|
ProtocolHeader = "X-Forwarded-Proto";
|
|
|
|
ForwardedForHeader = "X-Forwarded-For";
|
|
|
|
};
|
|
|
|
Session = {
|
|
|
|
IdleTimeout = 120; # 2 hours.
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|