mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 07:15:54 +03:00
nixos/guacamole-client: init
This commit is contained in:
parent
a68567c35d
commit
a950888024
@ -1193,6 +1193,7 @@
|
||||
./services/web-apps/gotosocial.nix
|
||||
./services/web-apps/grocy.nix
|
||||
./services/web-apps/pixelfed.nix
|
||||
./services/web-apps/guacamole-client.nix
|
||||
./services/web-apps/healthchecks.nix
|
||||
./services/web-apps/hedgedoc.nix
|
||||
./services/web-apps/hledger-web.nix
|
||||
|
60
nixos/modules/services/web-apps/guacamole-client.nix
Normal file
60
nixos/modules/services/web-apps/guacamole-client.nix
Normal file
@ -0,0 +1,60 @@
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.guacamole-client;
|
||||
settingsFormat = pkgs.formats.javaProperties { };
|
||||
in
|
||||
{
|
||||
options = {
|
||||
services.guacamole-client = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "Apache Guacamole Client (Tomcat)");
|
||||
package = lib.mkPackageOptionMD pkgs "guacamole-client" { };
|
||||
|
||||
settings = lib.mkOption {
|
||||
type = lib.types.submodule {
|
||||
freeformType = settingsFormat.type;
|
||||
};
|
||||
default = {
|
||||
guacd-hostname = "localhost";
|
||||
guacd-port = 4822;
|
||||
};
|
||||
description = lib.mdDoc ''
|
||||
Configuration written to `guacamole.properties`.
|
||||
|
||||
::: {.note}
|
||||
The Guacamole web application uses one main configuration file called
|
||||
`guacamole.properties`. This file is the common location for all
|
||||
configuration properties read by Guacamole or any extension of
|
||||
Guacamole, including authentication providers.
|
||||
:::
|
||||
'';
|
||||
};
|
||||
|
||||
enableWebserver = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = lib.mdDoc ''
|
||||
Enable the Guacamole web application in a Tomcat webserver.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.etc."guacamole/guacamole.properties" = lib.mkIf
|
||||
(cfg.settings != {})
|
||||
{ source = (settingsFormat.generate "guacamole.properties" cfg.settings); };
|
||||
|
||||
services = lib.mkIf cfg.enableWebserver {
|
||||
tomcat = {
|
||||
enable = true;
|
||||
webapps = [
|
||||
cfg.package
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -314,6 +314,7 @@ in {
|
||||
graylog = handleTest ./graylog.nix {};
|
||||
grocy = handleTest ./grocy.nix {};
|
||||
grub = handleTest ./grub.nix {};
|
||||
guacamole-client = handleTest ./guacamole-client.nix {};
|
||||
gvisor = handleTest ./gvisor.nix {};
|
||||
hadoop = import ./hadoop { inherit handleTestOn; package=pkgs.hadoop; };
|
||||
hadoop_3_2 = import ./hadoop { inherit handleTestOn; package=pkgs.hadoop_3_2; };
|
||||
|
@ -1,6 +1,7 @@
|
||||
{ lib
|
||||
, stdenvNoCC
|
||||
, fetchurl
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
@ -24,6 +25,10 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
inherit (nixosTests) guacamole-client;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Clientless remote desktop gateway";
|
||||
homepage = "https://guacamole.apache.org/";
|
||||
|
Loading…
Reference in New Issue
Block a user