How to Install myDrive on nixOS Latest
In this tutorial, we will demonstrate how to install myDrive on nixOS Latest using the official myDrive GitHub repository.
Prerequisites
- NixOS Latest
- Github account
Step 1: Clone the myDrive Repository
To proceed with the installation of myDrive, we first need to download the latest version of the code by cloning the official myDrive GitHub repository:
$ git clone https://github.com/subnub/myDrive.git
Step 2: Install the Dependencies
myDrive has several dependencies that we need to install before we can run it. We will use the Nix package manager to install these dependencies.
$ nix-shell ./nix/shell.nix
Step 3: Configure myDrive
There are several configuration settings that need to be set up before we can run myDrive. Use the config.edn file to set up the required configuration. You will find it in the root myDrive directory.
{:database-url "jdbc:postgresql://localhost:5432/mydrive?user=myuser&password=mypassword"
:server {:port 8080}
:mailer {:user "[email protected]", :password "mypassword"}
:storage {:type :local, :dir "/path/to/mydrive/root-directory"}
:auth {:init {:admin-name "MyUserName", :admin-email "[email protected]"}
:google {:oauth2 {:client-id "myclientid.apps.googleusercontent.com"
:client-secret "myclientsecret"}}}}
Replace the database-url with your own postgresql database details, mailer with your email credentials, storage-dir with your desired directory path, init with your desired admin username and email, and google with your oauth2 credentials.
Save and close the file after.
Step 4: Run myDrive
Now that you have configured your settings, you can run myDrive by executing:
$ lein run
Doing so should run myDrive and give you a URL that you can visit to access the application. Just enter the URL on your web browser and you are good to go.
Conclusion
You should now have myDrive running on nixOS. Feel free to play around with the application and tweak the settings to your liking.
That’s it! Thank you for reading this tutorial on how to install myDrive on nixOS Latest.