Unverified Commit c4b04018 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

nixos/eintopf: rename service to lauti (#493803)

parents be14b9f0 5061223d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@

- [QGroundControl], a ground station support and configuration manager for the PX4 and APM Flight Stacks. Available as [programs.qgroundcontrol](options.html#opt-programs.qgroundcontrol.enable).

- [Eintopf](https://eintopf.info), a community event and calendar web application. Available as [services.eintopf](options.html#opt-services.eintopf.enable).
- [Eintopf](https://eintopf.info), a community event and calendar web application. Available as `services.eintopf`.

- [`pay-respects`](https://codeberg.org/iff/pay-respects), a terminal command correction program, alternative to `thefuck`, written in Rust. Available as [programs.pay-respects](options.html#opt-programs.pay-respects).

+2 −0
Original line number Diff line number Diff line
@@ -110,6 +110,8 @@ of pulling the upstream container image from Docker Hub. If you want the old beh
  - `systemd.services.stalwart` owned by `stalwart:stalwart`. The `user` and `group` are configurable via `services.stalwart.user` and `services.stalwart.group`, respectively. By default, if `stateVersion` is older than `26.05`, will fallback to legacy value of `stalwart-mail` for both `user` and `group`.
  - Default value for `services.stalwart.dataDir` has changed to `/var/lib/stalwart`. If `stateVersion` is older than `26.05`, will fallback to legacy value of `/var/lib/stalwart-mail`.

- `services.eintopf` has been renamed to `services.lauti` to align with upstream re-brand as a community online calendar.

- `services.oauth2-proxy.clientSecret` and `services.oauth2-proxy.cookie.secret` have been replaced with `services.oauth2-proxy.clientSecretFile` and `services.oauth2-proxy.cookie.secretFile` respectively. This was done to ensure secrets don't get made world-readable.

- [`services.grafana.settings.security.secret_key`](#opt-services.grafana.settings.security.secret_key) doesn't have a
+1 −1
Original line number Diff line number Diff line
@@ -1623,7 +1623,6 @@
  ./services/web-apps/drasl.nix
  ./services/web-apps/drupal.nix
  ./services/web-apps/echoip.nix
  ./services/web-apps/eintopf.nix
  ./services/web-apps/engelsystem.nix
  ./services/web-apps/ente.nix
  ./services/web-apps/fediwall.nix
@@ -1678,6 +1677,7 @@
  ./services/web-apps/lanraragi.nix
  ./services/web-apps/lasuite-docs.nix
  ./services/web-apps/lasuite-meet.nix
  ./services/web-apps/lauti.nix
  ./services/web-apps/lemmy.nix
  ./services/web-apps/librechat.nix
  ./services/web-apps/librespeed.nix
+26 −9
Original line number Diff line number Diff line
@@ -9,13 +9,30 @@ with lib;

let

  cfg = config.services.eintopf;
  cfg = config.services.lauti;
  useLegacyDefault = lib.versionOlder config.system.stateVersion "26.05";
  default = if useLegacyDefault then "eintopf" else "lauti";

in
{
  options.services.eintopf = {

    enable = mkEnableOption "Lauti (Eintopf) community event calendar web app";
  imports = [
    # since 0.12.0 (2025-05-26) release, upstream re-branded project to 'stalwart' due to inclusion of collaboration features (CalDAV, CardDAV, and WebDAV)
    #  https://github.com/stalwartlabs/stalwart/releases/tag/v0.12.0
    (lib.mkRenamedOptionModule [ "services" "eintopf" ] [ "services" "lauti" ])
  ];

  options.services.lauti = {

    enable = mkEnableOption "Lauti community event calendar web app";

    dataDir = lib.mkOption {
      type = lib.types.path;
      default = if useLegacyDefault then "/var/lib/eintopf" else "/var/lib/lauti";
      description = ''
        Data directory for Lauti
      '';
    };

    settings = mkOption {
      type = types.attrsOf types.str;
@@ -27,9 +44,9 @@ in
      '';
      example = literalExpression ''
        {
          EINTOPF_ADDR = ":1234";
          EINTOPF_ADMIN_EMAIL = "admin@example.org";
          EINTOPF_TIMEZONE = "Europe/Berlin";
          LAUTI_ADDR = ":1234";
          LAUTI_ADMIN_EMAIL = "admin@example.org";
          LAUTI_TIMEZONE = "Europe/Berlin";
        }
      '';
    };
@@ -47,7 +64,7 @@ in

  config = mkIf cfg.enable {

    systemd.services.eintopf = {
    systemd.services.lauti = {
      description = "Community event calendar web app";
      wantedBy = [ "multi-user.target" ];
      after = [ "network-online.target" ];
@@ -55,8 +72,8 @@ in
      environment = cfg.settings;
      serviceConfig = {
        ExecStart = lib.getExe pkgs.lauti;
        WorkingDirectory = "/var/lib/eintopf";
        StateDirectory = "eintopf";
        WorkingDirectory = cfg.dataDir;
        StateDirectory = default;
        EnvironmentFile = [ cfg.secrets ];

        # hardening
+7 −7
Original line number Diff line number Diff line
@@ -5,20 +5,20 @@
}:

{
  name = "eintopf";
  name = "lauti";
  meta.maintainers = with lib.maintainers; [ onny ];

  nodes = {
    eintopf = {
      services.eintopf.enable = true;
    lauti = {
      services.lauti.enable = true;
    };
  };

  testScript = ''
    eintopf.start
    eintopf.wait_for_unit("eintopf.service")
    eintopf.wait_for_open_port(3333)
    eintopf.succeed("curl -sSfL http://eintopf:3333 | grep 'No events available'")
    lauti.start
    lauti.wait_for_unit("lauti.service")
    lauti.wait_for_open_port(3333)
    lauti.succeed("curl -sSfL http://lauti:3333 | grep 'No events available'")
  '';

}