homeserver: added cockpit ui
This commit is contained in:
parent
9cd3c1b5b0
commit
f250903a47
|
@ -70,5 +70,7 @@
|
|||
|
||||
microsoft-edge.enable = lib.mkEnableOption "microsoft-edge";
|
||||
nextcloud.enable = lib.mkEnableOption "nextcloud";
|
||||
|
||||
cockpit.enable = lib.mkEnableOption "cockpit";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -24,5 +24,6 @@
|
|||
go.enable = true;
|
||||
networking.firewall.enable = true;
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
cockpit.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
25
system/modules/cockpit.nix
Normal file
25
system/modules/cockpit.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ 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 { })
|
||||
];
|
||||
services.cockpit = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
WebService = {
|
||||
AllowUnencrypted = true;
|
||||
ProtocolHeader = "X-Forwarded-Proto";
|
||||
ForwardedForHeader = "X-Forwarded-For";
|
||||
};
|
||||
Session = {
|
||||
IdleTimeout = 120; # 2 hours.
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -7,6 +7,7 @@
|
|||
./bluetooth.nix
|
||||
./boot_loader.nix
|
||||
./brightnessctl.nix
|
||||
./cockpit.nix
|
||||
./docker.nix
|
||||
./flatpak.nix
|
||||
./font.nix
|
||||
|
|
34
system/packages/cockpit-podman.nix
Normal file
34
system/packages/cockpit-podman.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{ lib, stdenv, fetchzip, gettext, ... }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cockpit-podman";
|
||||
version = "89";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/cockpit-project/${pname}/releases/download/${version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "sha256-qLt6x9W+M/DztzcFxyWZLHUTM1ZsPCOykO+6o/URa6c=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
gettext
|
||||
];
|
||||
|
||||
makeFlags = [ "DESTDIR=$(out)" "PREFIX=" ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace /usr/share $out/share
|
||||
touch pkg/lib/cockpit-po-plugin.js
|
||||
touch dist/manifest.json
|
||||
'';
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cockpit UI for podman containers";
|
||||
license = licenses.lgpl21;
|
||||
homepage = "https://github.com/cockpit-project/cockpit-podman";
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue