Savepad is a text editor built out of pure bash and it is available on Github. In this tutorial, we will go through the steps required to install savepad on a NixOS latest distribution.
Before proceeding with the installation process, you need to ensure that the following prerequisites are satisfied.
The first step is to ensure that Git is installed on your NixOS latest distribution by running the following command in your terminal.
sudo nix-env -i git
Next, we will clone the Savepad GitHub repository by executing the following command in your terminal:
git clone https://github.com/shelltr/textpad.git
This will download the Savepad files to a folder named textpad
.
Create a default.nix
file in the textpad
directory with the following content:
with import <nixpkgs> {};
stdenv.mkDerivation rec {
name = "savepad";
src = ./.;
buildInputs = [
bashInteractive
coreutils
diffutils
findutils
gawk
gnu-sed
grep
tree
unicodify
];
}
Then, in the textpad
directory, run the following command:
sudo nix-env -f default.nix -i
This will install all the dependencies required to run savepad on your NixOS latest distribution.
Add the path of the textpad/savepad
script to your shell environment by running the following command:
echo "export PATH=\"$(pwd)/textpad:\${PATH}\"" >> ~/.bashrc
This will ensure that the savepad
command can be executed from anywhere in the terminal.
Finally, let's verify that Savepad is correctly installed on your NixOS latest distribution.
Open your terminal and type the following command:
savepad
This will open Savepad and you can start using it to edit text files.
Congratulations! You have successfully installed Savepad on your NixOS latest distribution.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!