diff --git a/docs/modules/ROOT/pages/deployment.adoc b/docs/modules/ROOT/pages/deployment.adoc index 5e27d58..47dfd29 100644 --- a/docs/modules/ROOT/pages/deployment.adoc +++ b/docs/modules/ROOT/pages/deployment.adoc @@ -53,10 +53,13 @@ NOTE: This deployment method does NOT use an `arion-pkgs.nix` file, but reuses virtualisation.arion = { backend = "podman-socket"; # or "docker" - projects.example.settings = { - # Specify you project here, or import it from a file. - # NOTE: This does NOT use ./arion-pkgs.nix, but defaults to NixOS' pkgs. - imports = [ ./arion-compose.nix ]; + projects.example = { + serviceName = "example"; # optional systemd service name, defaults to arion-example in this case + settings = { + # Specify you project here, or import it from a file. + # NOTE: This does NOT use ./arion-pkgs.nix, but defaults to NixOS' pkgs. + imports = [ ./arion-compose.nix ]; + }; }; }; } diff --git a/nixos-module.nix b/nixos-module.nix index 06074db..c4f7beb 100644 --- a/nixos-module.nix +++ b/nixos-module.nix @@ -26,9 +26,14 @@ let visible = "shallow"; }; _systemd = mkOption { internal = true; }; + serviceName = mkOption { + description = "The name of the Arion project's systemd service"; + type = types.str; + default = "arion-${name}"; + }; }; config = { - _systemd.services."arion-${name}" = { + _systemd.services.${config.serviceName} = { wantedBy = [ "multi-user.target" ]; after = [ "sockets.target" ];