NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.51k stars 13k forks source link

Rustdesk's headless mode. #323554

Open Bot-wxt1221 opened 1 week ago

Bot-wxt1221 commented 1 week ago

Issue description

Since 1.2, rustdesk support headless mode. It try to install services to system. However, it failed. It should be included in nixpkgs.

Steps to reproduce

image

Allow linux headless

Technical details

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

This is an feature request. So it was not required.

CC @0x4A6F for adding the new feature.

Bot-wxt1221 commented 1 week ago
systemd.services.rustdesk = {
    enable = true;
    description = "rustdesk";
    serviceConfig = {
      ExecStart = "${pkgs.rustdesk}/bin/rustdesk --service";
      ExecStop = "pkill -f \"rustdesk --\"";
      PIDFile = "/run/rustdesk.pid";
      KillMode = "mixed";
      TimeoutStopSec = "30";
      User = "root";
      LimitNOFILE = "100000";
    };
    wantedBy = [ "multi-user.target" ];
    requires = ["network-online.target"];
    after = ["display-manager.service"];
  };

This is my way