Dropbox: Difference between revisions
imported>Ward Change maestral nixpkgs links to their package names |
Phanirithvij (talk | contribs) m info about dead pr |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
== Using the package == | == Using the package == | ||
Install the <code>dropbox</code> package after enabling [ | Install the <code>dropbox</code> package after enabling [[Unfree software|unfree software]]. | ||
Then start the dropbox command, which will download the real dropbox binary and start it. | Then start the dropbox command, which will download the real dropbox binary and start it. | ||
== Configure Dropbox as a Service on NixOS == | == Configure Dropbox as a Service on NixOS == | ||
As of right now ( | |||
As of right now (16 Mar 2025) there is no dropbox module in nixpkgs, however [https://discourse.nixos.org/t/using-dropbox-on-nixos/387/6 peterhoeg at discourse.nixos.org] shared the service code he is using: | |||
<syntaxHighlight lang=nix> | <syntaxHighlight lang=nix> | ||
Line 27: | Line 28: | ||
}; | }; | ||
serviceConfig = { | serviceConfig = { | ||
ExecStart = "${pkgs.dropbox | ExecStart = "${lib.getBin pkgs.dropbox}/bin/dropbox"; | ||
ExecReload = "${pkgs.coreutils | ExecReload = "${lib.getBin pkgs.coreutils}/bin/kill -HUP $MAINPID"; | ||
KillMode = "control-group"; # upstream recommends process | KillMode = "control-group"; # upstream recommends process | ||
Restart = "on-failure"; | Restart = "on-failure"; | ||
Line 39: | Line 40: | ||
</syntaxHighlight> | </syntaxHighlight> | ||
A [https://github.com/NixOS/nixpkgs/pull/85699 pull request] has been created to add Dropbox as a Nixos module which builds on this code snippet (21 Apr 2020). As of | A [https://github.com/NixOS/nixpkgs/pull/85699 pull request] has been created to add Dropbox as a Nixos module which builds on this code snippet (21 Apr 2020). As of 16 Mar 2025, this has been closed and abandoned. | ||
== Configure Dropbox as a Service in HomeManager == | |||
The dropbox package is better maintained than the dropbox-cli package. The follow sets up dropbox as a service in home manager (working in Sept. 2024). | |||
<syntaxHighlight lang=nix> | |||
{ | |||
systemd.user.services.dropbox = { | |||
Unit = { | |||
Description = "Dropbox service"; | |||
}; | |||
Install = { | |||
WantedBy = [ "default.target" ]; | |||
}; | |||
Service = { | |||
ExecStart = "${pkgs.dropbox}/bin/dropbox"; | |||
Restart = "on-failure"; | |||
}; | |||
}; | |||
} | |||
</syntaxHighlight> | |||
== Alternative Open Source Client == | == Alternative Open Source Client == |