Onedrive Unable to parse OpenSSL version

Hello guys,

I have some trouble getting my onedrive sync to work again.

I followed the steps in this guide: OneDrive - NixOS Wiki
Enabling and starting the service previously worked with the following commands:

systemctl --user enable onedrive@onedrive.service
systemctl --user start onedrive@onedrive.service

Also already searched how nix resolves dependencies etc. to see if openssl is available for the package but could not understand how to to figure this out :expressionless:

I currently use onedrive for syncing both my personal files as well as study related files.

For study related files I created a systemd service: see below. This service is still working completely fine.

Package info:
onedrive --version
onedrive v2.5.3

If I use:

nix-shell -p openssl
onedrive --sync

it works perfectly fine

A couple weeks ago there was a fix related to the same error message but for the docker image, maybe it is related to this one?:

flake.lock

{
  "nodes": {
    "home-manager": {
      "inputs": {
        "nixpkgs": [
          "nixpkgs"
        ]
      },
      "locked": {
        "lastModified": 1733133928,
        "narHash": "sha256-gU40r9AfpIr4eq+0noM8yH1Hxf+EA3dqfIpFtQl8Y1E=",
        "owner": "nix-community",
        "repo": "home-manager",
        "rev": "873e39d5f4437d2f3ab06881fea8e63e45e1d011",
        "type": "github"
      },
      "original": {
        "owner": "nix-community",
        "repo": "home-manager",
        "type": "github"
      }
    },
    "nixpkgs": {
      "locked": {
        "lastModified": 1733015953,
        "narHash": "sha256-t4BBVpwG9B4hLgc6GUBuj3cjU7lP/PJfpTHuSqE+crk=",
        "owner": "nixos",
        "repo": "nixpkgs",
        "rev": "ac35b104800bff9028425fec3b6e8a41de2bbfff",
        "type": "github"
      },
      "original": {
        "owner": "nixos",
        "ref": "nixos-unstable",
        "repo": "nixpkgs",
        "type": "github"
      }
    },
    "root": {
      "inputs": {
        "home-manager": "home-manager",
        "nixpkgs": "nixpkgs"
      }
    }
  },
  "root": "root",
  "version": 7
}

Systemd service for syncing university files:

{
  config,
  pkgs,
  lib,
  ...
}: {
  systemd.services.onedrive-htwd = {
    after = ["network-online.target"];
    description = "OneDrive Client for Linux";

    serviceConfig = {
      ProtectSystem = "full";
      #PrivateDevices = "true";  # Commented out for compatibility
      ProtectHostname = "true";
      #ProtectClock = "true";  # Commented out for compatibility
      ProtectKernelTunables = "true";
      #ProtectKernelModules = "true";  # Commented out for compatibility
      #ProtectKernelLogs = "true";  # Commented out for compatibility
      ProtectControlGroups = "true";
      RestrictRealtime = "true";

      ExecStartPre = "${pkgs.coreutils}/bin/sleep 15"; # Ensure sleep command is correct
      ExecStart = "${pkgs.onedrive}/bin/onedrive --monitor --confdir=/home/<user>/.config/onedrive-university";

      Restart = "on-failure";
      RestartSec = "3";
      RestartPreventExitStatus = "126";
      TimeoutStopSec = "90"; # Optional, based on your needs
    };

    wantedBy = ["default.target"];
  };
}

About my system:

Operating System: NixOS 25.05
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.6.63 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i5-10210U CPU @ 1.60GHz
Memory: 7,5 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Manufacturer: LENOVO
Product Name: 81TC
System Version: Lenovo Yoga C740-14IML

getting this too, a fix is merged in the onedrive project, (here). It’s set for release in v2.5.4 according to the PR. We may be able to cherry pick the patch in the meantime, I’ll look into it. Otherwise it’s a case of wait for 2.5.4 to be released

Fixed in #362601. Backported to 24.11 as well

1 Like