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

Merge master into staging-next

parents 5a2dbe92 8c7be35b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ This setup hook attempts to use [the `just` command runner](https://just.systems

## `buildPhase` {#just-hook-buildPhase}

This phase attempts to invoke `just` with [the default recipe](https://just.systems/man/en/chapter_23.html).
This phase attempts to invoke `just` with [the default recipe](https://just.systems/man/en/the-default-recipe.html).

[]{#just-hook-dontUseJustBuild} This behavior can be disabled by setting `dontUseJustBuild` to `true`.

+59 −26
Original line number Diff line number Diff line
@@ -3,6 +3,12 @@ let
  TCPPorts = [21115 21116 21117 21118 21119];
  UDPPorts = [21116];
in {
  imports = [
    (lib.mkRemovedOptionModule [ "services" "rustdesk-server" "relayIP" ] "This option has been replaced by services.rustdesk-server.signal.relayHosts")
    (lib.mkRenamedOptionModule [ "services" "rustdesk-server" "extraRelayArgs" ] [ "services" "rustdesk-server" "relay" "extraArgs" ])
    (lib.mkRenamedOptionModule [ "services" "rustdesk-server" "extraSignalArgs" ] [ "services" "rustdesk-server" "signal" "extraArgs" ])
  ];

  options.services.rustdesk-server = with lib; with types; {
    enable = mkEnableOption "RustDesk, a remote access and remote control software, allowing maintenance of computers and other devices";

@@ -18,14 +24,25 @@ in {
      '';
    };

    relayIP = mkOption {
      type = str;
    signal = {
      enable = mkOption {
        type = bool;
        default = true;
        description = ''
          Whether to enable the RustDesk signal server.
        '';
      };

      relayHosts = mkOption {
        type = listOf str;
        default = [];
        # reference: https://rustdesk.com/docs/en/self-host/rustdesk-server-pro/relay/
        description = ''
        The public facing IP of the RustDesk relay.
          The relay server IP addresses or DNS names of the RustDesk relay.
        '';
      };

    extraSignalArgs = mkOption {
      extraArgs = mkOption {
        type = listOf str;
        default = [];
        example = [ "-k" "_" ];
@@ -34,7 +51,17 @@ in {
        '';
      };

    extraRelayArgs = mkOption {
    };

    relay = {
      enable = mkOption {
        type = bool;
        default = true;
        description = ''
          Whether to enable the RustDesk relay server.
        '';
      };
      extraArgs = mkOption {
        type = listOf str;
        default = [];
        example = [ "-k" "_" ];
@@ -44,6 +71,8 @@ in {
      };
    };

  };

  config = let
    cfg = config.services.rustdesk-server;
    serviceDefaults = {
@@ -96,13 +125,17 @@ in {
      wantedBy = [ "multi-user.target" ];
    };

    systemd.services.rustdesk-signal = lib.mkMerge [ serviceDefaults {
      serviceConfig.ExecStart = "${cfg.package}/bin/hbbs -r ${cfg.relayIP} ${lib.escapeShellArgs cfg.extraSignalArgs}";
    } ];
    systemd.services.rustdesk-signal =
      let
        relayArg = builtins.concatStringsSep ":" cfg.signal.relayHosts;
      in
        lib.mkIf cfg.signal.enable (lib.mkMerge [ serviceDefaults {
          serviceConfig.ExecStart = "${cfg.package}/bin/hbbs --relay-servers ${relayArg} ${lib.escapeShellArgs cfg.signal.extraArgs}";
        } ]);

    systemd.services.rustdesk-relay = lib.mkMerge [ serviceDefaults {
      serviceConfig.ExecStart = "${cfg.package}/bin/hbbr ${lib.escapeShellArgs cfg.extraRelayArgs}";
    } ];
    systemd.services.rustdesk-relay = lib.mkIf cfg.relay.enable (lib.mkMerge [ serviceDefaults {
      serviceConfig.ExecStart = "${cfg.package}/bin/hbbr ${lib.escapeShellArgs cfg.relay.extraArgs}";
    } ]);
  };

  meta.maintainers = with lib.maintainers; [ ppom ];
+2 −0
Original line number Diff line number Diff line
@@ -160,6 +160,8 @@ in {
        }
      });
    '';
    # dbus/polkit with DynamicUser is broken with the default implementation
    services.dbus.implementation = "broker";

    # We don't use the existing gobgp NixOS module and package, because the gobgp
    # version might not be compatible with fastnetmon. Also, the service name
+26 −9
Original line number Diff line number Diff line
{ lib, appimageTools, runCommand, curl, gnugrep, cacert }:
{
  lib,
  appimageTools,
  runCommand,
  curl,
  gnugrep,
  cacert,
}:

appimageTools.wrapType1 rec {
  pname = "pureref";
  version = "2.0.3";

  src = runCommand "PureRef-${version}_x64.Appimage" {
    nativeBuildInputs = [ curl gnugrep cacert ];
  src =
    runCommand "PureRef-${version}_x64.Appimage"
      {
        nativeBuildInputs = [
          curl
          gnugrep
          cacert
        ];
        outputHash = "sha256-0iR1cP2sZvWWqKwRAwq6L/bmIBSYHKrlI8u8V2hANfM=";
  } ''
    key="$(curl "https://www.pureref.com/download.php" --silent | grep '%3D%3D' | cut -d '"' -f2)"
      }
      ''
        key="$(curl -A 'nixpkgs/Please contact maintainer if there is an issue' "https://www.pureref.com/download.php" --silent | grep '%3D%3D' | cut -d '"' -f2)"
        curl -L "https://www.pureref.com/files/build.php?build=LINUX64.Appimage&version=${version}&downloadKey=$key" --output $out
      '';

@@ -16,7 +30,10 @@ appimageTools.wrapType1 rec {
    description = "Reference Image Viewer";
    homepage = "https://www.pureref.com";
    license = licenses.unfree;
    maintainers = with maintainers; [ elnudev ];
    maintainers = with maintainers; [
      elnudev
      husjon
    ];
    platforms = [ "x86_64-linux" ];
    sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
  };
+2 −17
Original line number Diff line number Diff line
@@ -252,14 +252,6 @@ let
      # We also need enable_widevine_cdm_component to be false. Unfortunately it isn't exposed as gn
      # flag (declare_args) so we simply hardcode it to false.
      ./patches/widevine-disable-auto-download-allow-bundle.patch
    ] ++ lib.optionals (versionRange "125" "126") [
      # Fix building M125 with ninja 1.12. Not needed for M126+.
      # https://issues.chromium.org/issues/336911498
      # https://chromium-review.googlesource.com/c/chromium/src/+/5487538
      (githubPatch {
        commit = "a976cb05b4024b7a6452d1541378d718cdfe33e6";
        hash = "sha256-K2PSeJAvhGH2/Yp63/4mJ85NyqXqDDkMWY+ptrpgmOI=";
      })
    ] ++ lib.optionals (versionRange "127" "128") [
      # Fix missing chrome/browser/ui/webui_name_variants.h dependency
      # and ninja 1.12 compat in M127.
@@ -293,21 +285,14 @@ let
      # Chromium reads initial_preferences from its own executable directory
      # This patch modifies it to read /etc/chromium/initial_preferences
      ./patches/chromium-initial-prefs.patch
    ] ++ lib.optionals (versionRange "120" "126") [
      # Partial revert to build M120+ with LLVM 17:
      # https://github.com/chromium/chromium/commit/02b6456643700771597c00741937e22068b0f956
      # https://github.com/chromium/chromium/commit/69736ffe943ff996d4a88d15eb30103a8c854e29
      ./patches/chromium-120-llvm-17.patch
    ] ++ lib.optionals (chromiumVersionAtLeast "126") [
      # Rebased variant of patch right above to build M126+ with LLVM 17.
      # Rebased variant of patch to build M126+ with LLVM 17.
      # staging-next will bump LLVM to 18, so we will be able to drop this soon.
      ./patches/chromium-126-llvm-17.patch
    ] ++ lib.optionals (versionRange "121" "126") [
      # M121 is the first version to require the new rust toolchain.
    ] ++ lib.optionals (versionRange "126" "129") [
      # Partial revert of https://github.com/chromium/chromium/commit/3687976b0c6d36cf4157419a24a39f6770098d61
      # allowing us to use our rustc and our clang.
      ./patches/chromium-121-rust.patch
    ] ++ lib.optionals (versionRange "126" "129") [
      # Rebased variant of patch right above to build M126+ with our rust and our clang.
      ./patches/chromium-126-rust.patch
    ] ++ lib.optionals (chromiumVersionAtLeast "129") [
Loading