OneDrive: Difference between revisions
imported>Rkitover Create page describing how to set up and use OneDrive in NixOS. |
m reduced categories to Category:Applications |
||
(9 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
OneDrive is Microsoft's cloud file storage service. If you have a OneDrive account, for example from your organization or your Office 365 subscription, NixOS has software to let you sync it to your home directory. | OneDrive is Microsoft's cloud file storage service. If you have a OneDrive account, for example from your organization or your Office 365 subscription, NixOS has software to let you sync it to a OneDrive directory your home directory. | ||
== Setup == | == Setup == | ||
Line 14: | Line 14: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
onedrive | onedrive | ||
</syntaxhighlight> | </syntaxhighlight> | ||
You will be given a login URL, open it in your browser, log in to the appropriate Microsoft account to which your OneDrive account is linked to, and after you are logged in, copy the URL you are redirected to and paste it back in the terminal. | You will be given a login URL, open it in your browser, log in to the appropriate Microsoft account to which your OneDrive account is linked to, and after you are logged in, you get an empty screen. This is good, just copy the URL you are redirected to and paste it back in the terminal. | ||
Then run the following: | Then run the following: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
systemctl --user enable onedrive@onedrive | systemctl --user enable onedrive@onedrive.service | ||
systemctl --user start onedrive@onedrive | systemctl --user start onedrive@onedrive.service | ||
</syntaxhighlight> | </syntaxhighlight> | ||
this will enable and start the systemd user service. | this will enable and start the systemd user service. Note: this makes a symlink that is unmanaged by NixOS. When the onedrive service is updated, be sure to disable and enable the Systemd service again. | ||
Check that the service started successfully and is running: | Check that the service started successfully and is running: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
systemctl --user status onedrive@onedrive | systemctl --user status onedrive@onedrive.service | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 37: | Line 37: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
journalctl | journalctl --user -t onedrive | less | ||
</syntaxhighlight> | </syntaxhighlight> | ||
. | . | ||
[[ | == See Also == | ||
[[Category: | |||
* [https://onedrive.live.com Microsoft OneDrive] | |||
* [https://github.com/abraunegg/onedrive OneDrive client for Linux] | |||
* [https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/sync/onedrive/default.nix nixpkgs OneDrive client package definition] | |||
[[Category:Applications]] |
Latest revision as of 19:54, 19 April 2024
OneDrive is Microsoft's cloud file storage service. If you have a OneDrive account, for example from your organization or your Office 365 subscription, NixOS has software to let you sync it to a OneDrive directory your home directory.
Setup
Add the following to your /etc/nixos/configuration.nix
:
/etc/nixos/configuration.nix
services.onedrive.enable = true;
and rebuild your system.
Then as the user, run the following:
onedrive
You will be given a login URL, open it in your browser, log in to the appropriate Microsoft account to which your OneDrive account is linked to, and after you are logged in, you get an empty screen. This is good, just copy the URL you are redirected to and paste it back in the terminal.
Then run the following:
systemctl --user enable onedrive@onedrive.service
systemctl --user start onedrive@onedrive.service
this will enable and start the systemd user service. Note: this makes a symlink that is unmanaged by NixOS. When the onedrive service is updated, be sure to disable and enable the Systemd service again.
Check that the service started successfully and is running:
systemctl --user status onedrive@onedrive.service
To view the log, run the following:
journalctl --user -t onedrive | less
.