Skip to content

Commit

Permalink
update documentation for nix
Browse files Browse the repository at this point in the history
This patch updates documentation for nix, finalizing the basic nix implementation.

Signed-off-by: Amy Parker <amy@amyip.net>
  • Loading branch information
amyipdev committed Aug 11, 2023
1 parent 3d146d3 commit d0307e3
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 11 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,20 @@ The main thing that differs SSVP from other status pages is that it's designed f

**Full installation guide**: https://ssvp.docs.amyip.net/installing.html

You need to initialize a database software - either mysql, postgres, or sqlite (can be done by the installer).

### NixOS (23.11/unstable or later)

Read the [NixOS section](https://ssvp.docs.amyip.net/installing.html#NixOS) of the documentation.

### Other Distributions

- Clone the repostiory:

```sh
git clone --depth=1 https://github.com/amyipdev/ssvp
```

- Set up a database service (sqlite3, mysql, mariadb, or postgres)

Run the installer:
```sh
cd ssvp
Expand Down
104 changes: 96 additions & 8 deletions docs/installing.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,69 @@
Installation
============

Installation of SSVP is usually simple, thanks to the easy installer (:code:`./install.sh`).
Installation of SSVP is usually simple, thanks to the
easy installer (:code:`./install.sh`).

Supported Operating Systems
---------------------------

Right now, we're currently focusing on just supporting Linux. \*BSD and macOS support may come in the future; Windows support is unlikely.

Theoretically, any Linux distribution should work. We currently only officially support **Debian 12** and **Fedora 38**.

Our dependency installer currently has support for most **apt**-based and **dnf/yum**-based distributions. Support for other package managers is a `planned feature <https://github.com/amyipdev/ssvp/issues/23>`_.
The dependency verifier works on all systems, **but cannot check the presence of libpq and its headers**.
Support has a few main levels:

- Level 0: **Great Support**. Every commit is thoroughly tested on these
levels, usually due to developers running this on their own machines.
Support on these should be perfect. It is not necessary for a platform
to be level 0 for SSVP to be production-ready on it; however, level 0
platforms are the least likely to have bugs.
- Level 1: **Good Support**. These are environments known to work well.
No workarounds should be required. These platforms should survive major
changes to SSVP with ease, are tested in pipelines, and will always be
tested before any `"minor" <https://semver.org/>`_ releases.
They should be perfectly fine for production.
- Level 2: **Decent Support**. These environments should work just fine.
Minimal to no workarounds should be required. It is recommended to run
a release version of SSVP on these platforms, instead of running main.
Minor releases will have changes tested; however, testing may not be
as thorough. These are still fine to use in production, but a level 1
platform is recommended.
- Level 3: **Theoretical Support**. In theory, this platform should work
fine; it might have even been tested once. However, it's unknown whether
it works for sure. These platforms may require workarounds, and are not
recommended.
- Level 4: **Unknown Support**. These platforms have completely unknown
support. They have never been tested. Workarounds will likely be required.
- Level -1: **Borked**. These platforms are known not to work. If you'd like
to help make them work, feel free to `contribute <contributing.html>`_.

..
TODO: alphabetize
.. list-table::

* - Operating System
- Support Level
- Required OS Version
- Packaging Info
* - Fedora
- 0
- unknown
-
* - Debian
- 0
- unknown
-
* - NixOS
- 1
- 23.11/unstable
-
* - Ubuntu
- 3
- unknown
-

If you have to install dependencies manually, be aware that you need all of the packages list `here <https://github.com/amyipdev/ssvp/blob/main/installer/autoinstall-deps-system.sh>`_.

If you're on **NixOS**, jump to the :ref:`NixOS instructions<NixOS>`.

Downloading SSVP
----------------

Expand Down Expand Up @@ -70,4 +119,43 @@ The "enable on boot" option for systemd will take care of everything. OpenRC is
You're now done with the installation. You can run the server by running `srv/tmux.sh`. It should print :code:`no current client` when done. You can check on the server by running `tmux attach`,
and disconnect from it by pressing `CTRL-b d`.

If you need to change settings in your configuration file, please see the `configuration guide <configuration.html>`_.
If you need to change settings in your configuration file, please see the `configuration guide <configuration.html>`_.

NixOS
-----

.. _NixOS:

This section is only necessary for those using NixOS.

Because the Nix installer can't create a configuration file of its own, you need to create one.
See `the configuration manual <configuration.html>`_ for how to do this.

First, you need to open up your configuration file (either a local one, or `/etc/nixos/configuration.nix`). Locate the :code:`let` list, and add:

.. code-block:: nix
ssvp = builtins.fetchTarball "https://github.com/amyipdev/ssvp/archive/nix-shell-distrib.tar.gz";
Then, locate the :code:`imports` list, and add:

.. code-block:: nix
"${ssvp}/service.nix"
Below the end of the imports list, then add:

.. code-block:: nix
services.ssvp = {
enable = true;
configFile = "/path/to/ssvp-config-file";
}
Save and exit the file. Then, reload your nix config:

.. code-block:: bash
nixos-reload switch
SSVP is now up and running.
1 change: 0 additions & 1 deletion service.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ in {
enable = mkEnableOption "SSVP Production Environment";
configFile = mkOption {
type = types.str;
default = "${ins}/srv/ssvp-config.json";
description = "Configuration file";
};
};
Expand Down

0 comments on commit d0307e3

Please sign in to comment.