tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
nixos/guacamole-client: init
Pol Dellaiera
2 years ago
a9508880
a68567c3
+67
4 changed files
expand all
collapse all
unified
split
nixos
modules
module-list.nix
services
web-apps
guacamole-client.nix
tests
all-tests.nix
pkgs
servers
guacamole-client
default.nix
+1
nixos/modules/module-list.nix
···
1193
1193
./services/web-apps/gotosocial.nix
1194
1194
./services/web-apps/grocy.nix
1195
1195
./services/web-apps/pixelfed.nix
1196
1196
+
./services/web-apps/guacamole-client.nix
1196
1197
./services/web-apps/healthchecks.nix
1197
1198
./services/web-apps/hedgedoc.nix
1198
1199
./services/web-apps/hledger-web.nix
+60
nixos/modules/services/web-apps/guacamole-client.nix
···
1
1
+
{ config
2
2
+
, lib
3
3
+
, pkgs
4
4
+
, ...
5
5
+
}:
6
6
+
let
7
7
+
cfg = config.services.guacamole-client;
8
8
+
settingsFormat = pkgs.formats.javaProperties { };
9
9
+
in
10
10
+
{
11
11
+
options = {
12
12
+
services.guacamole-client = {
13
13
+
enable = lib.mkEnableOption (lib.mdDoc "Apache Guacamole Client (Tomcat)");
14
14
+
package = lib.mkPackageOptionMD pkgs "guacamole-client" { };
15
15
+
16
16
+
settings = lib.mkOption {
17
17
+
type = lib.types.submodule {
18
18
+
freeformType = settingsFormat.type;
19
19
+
};
20
20
+
default = {
21
21
+
guacd-hostname = "localhost";
22
22
+
guacd-port = 4822;
23
23
+
};
24
24
+
description = lib.mdDoc ''
25
25
+
Configuration written to `guacamole.properties`.
26
26
+
27
27
+
::: {.note}
28
28
+
The Guacamole web application uses one main configuration file called
29
29
+
`guacamole.properties`. This file is the common location for all
30
30
+
configuration properties read by Guacamole or any extension of
31
31
+
Guacamole, including authentication providers.
32
32
+
:::
33
33
+
'';
34
34
+
};
35
35
+
36
36
+
enableWebserver = lib.mkOption {
37
37
+
type = lib.types.bool;
38
38
+
default = true;
39
39
+
description = lib.mdDoc ''
40
40
+
Enable the Guacamole web application in a Tomcat webserver.
41
41
+
'';
42
42
+
};
43
43
+
};
44
44
+
};
45
45
+
46
46
+
config = lib.mkIf cfg.enable {
47
47
+
environment.etc."guacamole/guacamole.properties" = lib.mkIf
48
48
+
(cfg.settings != {})
49
49
+
{ source = (settingsFormat.generate "guacamole.properties" cfg.settings); };
50
50
+
51
51
+
services = lib.mkIf cfg.enableWebserver {
52
52
+
tomcat = {
53
53
+
enable = true;
54
54
+
webapps = [
55
55
+
cfg.package
56
56
+
];
57
57
+
};
58
58
+
};
59
59
+
};
60
60
+
}
+1
nixos/tests/all-tests.nix
···
314
314
graylog = handleTest ./graylog.nix {};
315
315
grocy = handleTest ./grocy.nix {};
316
316
grub = handleTest ./grub.nix {};
317
317
+
guacamole-client = handleTest ./guacamole-client.nix {};
317
318
gvisor = handleTest ./gvisor.nix {};
318
319
hadoop = import ./hadoop { inherit handleTestOn; package=pkgs.hadoop; };
319
320
hadoop_3_2 = import ./hadoop { inherit handleTestOn; package=pkgs.hadoop_3_2; };
+5
pkgs/servers/guacamole-client/default.nix
···
1
1
{ lib
2
2
, stdenvNoCC
3
3
, fetchurl
4
4
+
, nixosTests
4
5
}:
5
6
6
7
stdenvNoCC.mkDerivation (finalAttrs: {
···
23
24
24
25
runHook postInstall
25
26
'';
27
27
+
28
28
+
passthru.tests = {
29
29
+
inherit (nixosTests) guacamole-client;
30
30
+
};
26
31
27
32
meta = {
28
33
description = "Clientless remote desktop gateway";