Unverified Commit 723e1a67 authored by github-actions[bot]'s avatar github-actions[bot] Committed by GitHub
Browse files

Merge master into staging-next

parents 5a11b86f ee8bdf4f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -9493,6 +9493,12 @@
    githubId = 1318743;
    name = "Ivar";
  };
  ivyfanchiang = {
    email = "dev@ivyfanchiang.ca";
    github = "hexadecimalDinosaur";
    githubId = 36890802;
    name = "Ivy Fan-Chiang";
  };
  iwanb = {
    email = "tracnar@gmail.com";
    github = "iwanb";
+1 −0
Original line number Diff line number Diff line
@@ -1471,6 +1471,7 @@
  ./services/web-apps/netbox.nix
  ./services/web-apps/nextcloud.nix
  ./services/web-apps/nextcloud-notify_push.nix
  ./services/web-apps/nextcloud-whiteboard-server.nix
  ./services/web-apps/nextjs-ollama-llm-ui.nix
  ./services/web-apps/nexus.nix
  ./services/web-apps/nifi.nix
+6 −1
Original line number Diff line number Diff line
@@ -96,7 +96,12 @@ in {

    extraConfig = lib.mkOption {
      description = ''
        Docker extra registry configuration via environment variables.
        Docker extra registry configuration.
      '';
      example = lib.literalExpression ''
        {
          log.level = "debug";
        }
      '';
      default = {};
      type = lib.types.attrs;
+72 −0
Original line number Diff line number Diff line
{
  config,
  lib,
  pkgs,
  ...
}:

let

  inherit (lib)
    mkIf
    mkEnableOption
    mkOption
    types
    literalExpression
    ;
  cfg = config.services.nextcloud-whiteboard-server;

in
{
  options.services.nextcloud-whiteboard-server = {

    enable = mkEnableOption "Nextcloud backend server for the Whiteboard app";

    settings = mkOption {
      type = types.attrsOf types.str;
      default = { };
      description = ''
        Settings to configure backend server. Especially the Nextcloud host
        url has to be set. The required environment variable `JWT_SECRET_KEY`
        should be set via the secrets option.
      '';
      example = literalExpression ''
        {
          NEXTCLOUD_URL = "https://nextcloud.example.org";
        }
      '';
    };

    secrets = lib.mkOption {
      type = with types; listOf str;
      description = ''
        A list of files containing the various secrets. Should be in the
        format expected by systemd's `EnvironmentFile` directory.
      '';
      default = [ ];
    };

  };

  config = mkIf cfg.enable {

    systemd.services.nextcloud-whiteboard-server = {
      description = "Nextcloud backend server for the Whiteboard app";
      wantedBy = [ "multi-user.target" ];
      after = [ "network-online.target" ];
      wants = [ "network-online.target" ];
      environment = cfg.settings;
      serviceConfig = {
        ExecStart = "${lib.getExe pkgs.nextcloud-whiteboard-server}";
        WorkingDirectory = "%S/whiteboard";
        StateDirectory = "whiteboard";
        EnvironmentFile = [ cfg.secrets ];
        DynamicUser = true;
      };
    };

  };

  meta.maintainers = with lib.maintainers; [ onny ];

}
+10 −2
Original line number Diff line number Diff line
@@ -107,7 +107,10 @@ let

    wrapperArgsStr = if lib.isString wrapperArgs then wrapperArgs else lib.escapeShellArgs wrapperArgs;

    generatedWrapperArgs =
    generatedWrapperArgs = let
      binPath = lib.makeBinPath (lib.optional finalAttrs.withRuby rubyEnv ++ lib.optional finalAttrs.withNodeJs nodejs);
    in

      # vim accepts a limited number of commands so we join them all
          [
            "--add-flags" ''--cmd "lua ${providerLuaRc}"''
@@ -116,10 +119,15 @@ let
            "--add-flags" ''--cmd "set packpath^=${finalPackdir}"''
            "--add-flags" ''--cmd "set rtp^=${finalPackdir}"''
          ]
          ++ lib.optionals finalAttrs.withRuby [
            "--set" "GEM_HOME" "${rubyEnv}/${rubyEnv.ruby.gemPath}"
          ] ++ lib.optionals (binPath != "") [
            "--suffix" "PATH" ":" binPath
          ]
          ;

    providerLuaRc = neovimUtils.generateProviderRc {
      inherit withPython3 withNodeJs withPerl;
      inherit (finalAttrs) withPython3 withNodeJs withPerl;
      withRuby = rubyEnv != null;
    };

Loading