Installing Goshorly on NixOS Latest
Goshorly is an open-source URL shortener designed for high throughput with minimal latency. In this tutorial, we will show you how to install Goshorly on NixOS Latest using the Gitea repository.
Prerequisites
- A NixOS Latest installation.
- Basic knowledge of Nix package manager.
Installation
- Open
configuration.nixfile:
sudo nano /etc/nixos/configuration.nix
- Add the following lines at the bottom of the file:
services.goshorly = {
enable = true;
listenPort = 8080;
};
nixpkgs.config.packageOverrides = pkgs: {
goshorly = pkgs.golangPackages.go.tools.go.get {
pname = "goshorly";
fetch = {
type = "git";
url = "https://gitea.hackmi.ch/Phil/goshorly";
rev = "v1.0.0";
sha256 = "0000000000000000000000000000000000000000000000000000";
};
};
};
Save and close the file.
Update the system:
sudo nixos-rebuild switch
- Start the Goshorly service:
sudo systemctl start goshorly
- Verify that the service is running:
sudo systemctl status goshorly
Conclusion
Congratulations! You have successfully installed Goshorly on NixOS Latest. Now you can use this URL shortener to easily create short links for your projects.