Install Beanstalkd on NixOS
Beanstalkd is a simple, fast work queue. In this tutorial, we will learn how to install Beanstalkd on NixOS.
Step 1: Add Beanstalkd to NixOS configuration
Open /etc/nixos/configuration.nix with your favorite text editor and add the following lines to your NixOS configuration file.
services.beanstalkd.enable = true;
This will enable the beanstalkd service in NixOS.
Step 2: Reload NixOS configuration
After you have made changes to the configuration.nix file, you need to reload the NixOS configuration.
sudo nixos-rebuild switch
This will reload the NixOS configuration and apply the changes.
Step 3: Start Beanstalkd
Start the Beanstalkd service using the following command:
sudo systemctl start beanstalkd
To verify that Beanstalkd is running, use the following command:
sudo systemctl status beanstalkd
You should see an output similar to the following:
● beanstalkd.service - Simple, fast work queue
Loaded: loaded (/nix/store/8xdn0jrpvarnv2zhrh6jaiwi6fbm0cag-unit-beanstalkd.service/beanstalkd.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2021-09-20 08:54:53 UTC; 21s ago
Main PID: 12345 (beanstalkd)
Tasks: 1 (limit: 512)
Memory: 404.0K
CPU: 4ms
CGroup: /system.slice/beanstalkd.service
└─12345 /nix/store/abcd1234-beanstalkd/bin/beanstalkd -l 127.0.0.1 -p 11300
Sep 20 08:54:53 nixos systemd[1]: Started Simple, fast work queue.
This indicates that Beanstalkd is running.
Conclusion
Congratulations! You have successfully installed Beanstalkd on NixOS Latest. You can now use Beanstalkd for your queueing needs.