37 lines
783 B
Nix
37 lines
783 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
namespace,
|
|
...
|
|
}:
|
|
let
|
|
name = "cockpit";
|
|
cfg = config.${namespace}.services.${name};
|
|
|
|
cockpitConfig = lib.${namespace}.mkModule {
|
|
inherit config name;
|
|
description = "Cockpit web-based server management UI";
|
|
moduleConfig = {
|
|
services.cockpit = {
|
|
enable = true;
|
|
port = cfg.port;
|
|
openFirewall = cfg.openFirewall;
|
|
allowed-origins = [
|
|
"https://10.0.1.3:${toString cfg.port}"
|
|
"https://jallen-nas:${toString cfg.port}"
|
|
"https://jallen-nas.local:${toString cfg.port}"
|
|
];
|
|
plugins = with pkgs.${namespace}; [
|
|
# cockpit-benchmark
|
|
cockpit-podman
|
|
cockpit-machines
|
|
];
|
|
};
|
|
};
|
|
};
|
|
in
|
|
{
|
|
imports = [ cockpitConfig ];
|
|
}
|