Loading nixos/modules/services/web-apps/guacamole-client.nix +25 −0 Original line number Diff line number Diff line Loading @@ -41,13 +41,38 @@ in Enable the Guacamole web application in a Tomcat webserver. ''; }; logbackXml = lib.mkOption { type = lib.types.nullOr lib.types.path; default = null; example = "/path/to/logback.xml"; description = '' Configuration file that correspond to `logback.xml`. ''; }; userMappingXml = lib.mkOption { type = lib.types.nullOr lib.types.path; default = null; example = "/path/to/user-mapping.xml"; description = '' Configuration file that correspond to `user-mapping.xml`. ''; }; }; }; config = lib.mkIf cfg.enable { # Setup configuration files. environment.etc."guacamole/guacamole.properties" = lib.mkIf (cfg.settings != { }) { source = (settingsFormat.generate "guacamole.properties" cfg.settings); }; environment.etc."guacamole/logback.xml" = lib.mkIf (cfg.logbackXml != null) { source = cfg.logbackXml; }; environment.etc."guacamole/user-mapping.xml" = lib.mkIf (cfg.userMappingXml != null) { source = cfg.userMappingXml; }; services = lib.mkIf cfg.enableWebserver { tomcat = { Loading nixos/modules/services/web-apps/guacamole-server.nix +10 −26 Original line number Diff line number Diff line Loading @@ -8,6 +8,16 @@ let cfg = config.services.guacamole-server; in { imports = [ (lib.mkRenamedOptionModule [ "services" "guacamole-server" "logbackXml" ] [ "services" "guacamole-client" "logbackXml" ] ) (lib.mkRenamedOptionModule [ "services" "guacamole-server" "userMappingXml" ] [ "services" "guacamole-client" "userMappingXml" ] ) ]; options = { services.guacamole-server = { enable = lib.mkEnableOption "Apache Guacamole Server (guacd)"; Loading Loading @@ -39,36 +49,10 @@ in ''; type = lib.types.port; }; logbackXml = lib.mkOption { type = lib.types.nullOr lib.types.path; default = null; example = "/path/to/logback.xml"; description = '' Configuration file that correspond to `logback.xml`. ''; }; userMappingXml = lib.mkOption { type = lib.types.nullOr lib.types.path; default = null; example = "/path/to/user-mapping.xml"; description = '' Configuration file that correspond to `user-mapping.xml`. ''; }; }; }; config = lib.mkIf cfg.enable { # Setup configuration files. environment.etc."guacamole/logback.xml" = lib.mkIf (cfg.logbackXml != null) { source = cfg.logbackXml; }; environment.etc."guacamole/user-mapping.xml" = lib.mkIf (cfg.userMappingXml != null) { source = cfg.userMappingXml; }; systemd.services.guacamole-server = { description = "Apache Guacamole server (guacd)"; wantedBy = [ "multi-user.target" ]; Loading Loading
nixos/modules/services/web-apps/guacamole-client.nix +25 −0 Original line number Diff line number Diff line Loading @@ -41,13 +41,38 @@ in Enable the Guacamole web application in a Tomcat webserver. ''; }; logbackXml = lib.mkOption { type = lib.types.nullOr lib.types.path; default = null; example = "/path/to/logback.xml"; description = '' Configuration file that correspond to `logback.xml`. ''; }; userMappingXml = lib.mkOption { type = lib.types.nullOr lib.types.path; default = null; example = "/path/to/user-mapping.xml"; description = '' Configuration file that correspond to `user-mapping.xml`. ''; }; }; }; config = lib.mkIf cfg.enable { # Setup configuration files. environment.etc."guacamole/guacamole.properties" = lib.mkIf (cfg.settings != { }) { source = (settingsFormat.generate "guacamole.properties" cfg.settings); }; environment.etc."guacamole/logback.xml" = lib.mkIf (cfg.logbackXml != null) { source = cfg.logbackXml; }; environment.etc."guacamole/user-mapping.xml" = lib.mkIf (cfg.userMappingXml != null) { source = cfg.userMappingXml; }; services = lib.mkIf cfg.enableWebserver { tomcat = { Loading
nixos/modules/services/web-apps/guacamole-server.nix +10 −26 Original line number Diff line number Diff line Loading @@ -8,6 +8,16 @@ let cfg = config.services.guacamole-server; in { imports = [ (lib.mkRenamedOptionModule [ "services" "guacamole-server" "logbackXml" ] [ "services" "guacamole-client" "logbackXml" ] ) (lib.mkRenamedOptionModule [ "services" "guacamole-server" "userMappingXml" ] [ "services" "guacamole-client" "userMappingXml" ] ) ]; options = { services.guacamole-server = { enable = lib.mkEnableOption "Apache Guacamole Server (guacd)"; Loading Loading @@ -39,36 +49,10 @@ in ''; type = lib.types.port; }; logbackXml = lib.mkOption { type = lib.types.nullOr lib.types.path; default = null; example = "/path/to/logback.xml"; description = '' Configuration file that correspond to `logback.xml`. ''; }; userMappingXml = lib.mkOption { type = lib.types.nullOr lib.types.path; default = null; example = "/path/to/user-mapping.xml"; description = '' Configuration file that correspond to `user-mapping.xml`. ''; }; }; }; config = lib.mkIf cfg.enable { # Setup configuration files. environment.etc."guacamole/logback.xml" = lib.mkIf (cfg.logbackXml != null) { source = cfg.logbackXml; }; environment.etc."guacamole/user-mapping.xml" = lib.mkIf (cfg.userMappingXml != null) { source = cfg.userMappingXml; }; systemd.services.guacamole-server = { description = "Apache Guacamole server (guacd)"; wantedBy = [ "multi-user.target" ]; Loading