PmWiki is a free and open-source wiki software application which can be installed on NixOS Latest. This guide will take you through the steps to download and install PmWiki on NixOS Latest.
sudo nix-channel --update
sudo nix-env -iA nixos.httpd nixos.php
curl -L https://www.pmwiki.org/pub/pmwiki/pmwiki-latest.tgz | tar zx
/var/www/html
using the following commands:sudo rm -rf /var/www/html/*
sudo mv pmwiki-*/pmwiki/* /var/www/html/
sudo chown -R apache:apache /var/www/html/
/etc/nixos/pmwiki.nix
. Open this file using your favorite text editor, and then copy and paste the following configuration:{ config, pkgs, ... }:
{
services.httpd = {
enable = true;
adminAddr = "you@example.com";
virtualHosts."yourdomain.com" = {
documentRoot = "/var/www/html";
serverAliases = [ "yourdomain.com" ];
locations."/pmwiki" = {
root = "/var/www/html";
directoryIndex = [ "pmwiki.php" ];
};
locations."/pub" = {
root = "/var/www";
directoryIndex = [ "pmwiki.php" ];
};
};
};
}
Note: Replace the "yourdomain.com" and "you@example.com" placeholders with your respective domain and email.
sudo nixos-rebuild switch
sudo systemctl start httpd
http://yourdomain.com/pmwiki
. You should now be able to see the PmWiki installation page. Follow the prompts to complete the installation process.Congratulations! You have successfully installed PmWiki on NixOS Latest.
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!