NixOS/system/modules/cockpit.nix

30 lines
744 B
Nix
Raw Normal View History

2024-06-12 20:51:10 +07:00
{ config, lib, pkgs, ... }:
let
cfg = config.profile.cockpit;
in
{
config = lib.mkIf cfg.enable {
environment.systemPackages = lib.mkIf config.profile.podman.enable [
(pkgs.callPackage ../packages/cockpit-podman.nix { })
];
2024-06-13 00:50:38 +07:00
services.caddy.virtualHosts."cockpit.tigor.web.id".extraConfig = ''
reverse_proxy 0.0.0.0:9090
'';
services.udisks2.enable = true;
2024-06-12 20:51:10 +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.
};
};
};
};
}