NixOS
Short version
Заголовок раздела «Short version»Nixpkgs has no Squad package or module, so you run Squad’s container image. You need a NixOS machine with 2 CPU cores, 2 GB of memory at least and 4 GB for a busy instance, and 20 GB of free disk, and a domain that points at it, or the machine’s IP address. Add the container below to your configuration, write fluxer.env and run nixos-rebuild switch. The install takes about 15 minutes from start to finish.
What this changes
Заголовок раздела «What this changes»- A systemd service called
podman-fluxer.service, ordocker-fluxer.servicewith the Docker backend, that runs the container. With the Docker backend, usedockerin place ofpodmanin the commands below. - One volume called
fluxer-data. - TCP ports 80, 443 and 7881, and UDP ports 443 and 7882, opened in the NixOS firewall.
Before you start
Заголовок раздела «Before you start»Check the requirements. Pick a place for fluxer.env outside the Nix store, such as /etc/fluxer/fluxer.env, because the store can be read by every user on the machine.
Install
Заголовок раздела «Install»-
Write the settings file as root.
Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.
Use your own domain. The second line is the upgrade step that the admin panel shows you when a newer release of Squad is out and the release check is on.
-
Add the container to your configuration, for example in
configuration.nix.Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.
lib.mkForceneedslibin the argument list at the top of the file, such as{ config, lib, pkgs, ... }:. Then runsudo nixos-rebuild dry-build, which checks the configuration and ends without errors. -
Apply it.
Окно терминала sudo nixos-rebuild switchThe first start pulls the image and takes a few minutes, then
systemctl status podman-fluxershowsactive (running). -
Print the setup token.
Окно терминала sudo podman exec fluxer fluxerd setup-tokenOpen your domain and paste the token to create the first admin account.
Upgrade
Заголовок раздела «Upgrade»Change the tag in image and run nixos-rebuild switch. nixos-rebuild switch --rollback goes back to the older image but doesn’t roll back the database. Restore the database with the fluxerd restore command the older release logs.