Перейти к содержимому

NixOS

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.

  • A systemd service called podman-fluxer.service, or docker-fluxer.service with the Docker backend, that runs the container. With the Docker backend, use docker in place of podman in 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.

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.

  1. 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.

  2. Add the container to your configuration, for example in configuration.nix.

    Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.

    lib.mkForce needs lib in the argument list at the top of the file, such as { config, lib, pkgs, ... }:. Then run sudo nixos-rebuild dry-build, which checks the configuration and ends without errors.

  3. Apply it.

    Окно терминала
    sudo nixos-rebuild switch

    The first start pulls the image and takes a few minutes, then systemctl status podman-fluxer shows active (running).

  4. Print the setup token.

    Окно терминала
    sudo podman exec fluxer fluxerd setup-token

    Open your domain and paste the token to create the first admin account.

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.