Eintopf: Difference between revisions

From NixOS Wiki
Onny (talk | contribs)
Add admin login config
Onny (talk | contribs)
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:


== Setup ==
== Setup ==
{{Note|The module is not yet part of the latest NixOS stable release and will be available with version 24.11.}}
A minimal local example setup would look like this
A minimal local example setup would look like this


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
environment.etc."eintopf-secrets".text = ''
EINTOPF_ADMIN_PASSWORD=test123
'';
services.eintopf = {
services.eintopf = {
   enable = true;
   enable = true;
   settings = {
   settings.EINTOPF_ADMIN_EMAIL = "test@example.org";
    EINTOPF_ADMIN_EMAIL = "test@example.org";
  secrets = [ /etc/eintopf-secrets ];
    EINTOPF_ADMIN_PASSWORD = "test123";
  };
};
};
</syntaxhighlight>
</syntaxhighlight>
Line 16: Line 21:
The web service will be available at http://localhost:3333. The administration login page is available at http://localhost:3333/backstage where you can use the credentials specified above.
The web service will be available at http://localhost:3333. The administration login page is available at http://localhost:3333/backstage where you can use the credentials specified above.


== Configuration ==
=== Templates ===
Following example packages the "karlsunruh" template and set it as default for Eintopf.<syntaxhighlight lang="nix">
{ pkgs, ... }:
let
  template-karlsunruh = pkgs.stdenv.mkDerivation {
    name = "karlsunruh";
    src = pkgs.fetchgit {
      url = "https://git.project-insanity.org/onny/eintopf-karlsunruh.git";
      rev = "81cb96424b1162b6dd20c1b22f03dbdf49ae30d4";
      hash = "sha256-+OeZG6+yZ0CwuIEN7pc0MankepZ6npiOD8RMyvWhQrY=";
    };
    dontBuild = true;
    installPhase = ''
      cp -r . $out/
    '';
  };
in
{
  services.eintopf = {
    enable = true;
    settings = {
      EINTOPF_THEMES = "eintopf,${template-karlsunruh}";
    };
  };
}
</syntaxhighlight>
[[Category:Server]]
[[Category:Server]]
[[Category:Web Applications]]
[[Category:Web Applications]]

Latest revision as of 12:10, 10 July 2024

Eintopf is a community event calendar for groups and places.

Setup

Note: The module is not yet part of the latest NixOS stable release and will be available with version 24.11.

A minimal local example setup would look like this

environment.etc."eintopf-secrets".text = ''
EINTOPF_ADMIN_PASSWORD=test123
'';

services.eintopf = {
  enable = true;
  settings.EINTOPF_ADMIN_EMAIL = "test@example.org";
  secrets = [ /etc/eintopf-secrets ];
};

The web service will be available at http://localhost:3333. The administration login page is available at http://localhost:3333/backstage where you can use the credentials specified above.

Configuration

Templates

Following example packages the "karlsunruh" template and set it as default for Eintopf.

{ pkgs, ... }:
let

  template-karlsunruh = pkgs.stdenv.mkDerivation {
    name = "karlsunruh";
    src = pkgs.fetchgit {
      url = "https://git.project-insanity.org/onny/eintopf-karlsunruh.git";
      rev = "81cb96424b1162b6dd20c1b22f03dbdf49ae30d4";
      hash = "sha256-+OeZG6+yZ0CwuIEN7pc0MankepZ6npiOD8RMyvWhQrY=";
    };
    dontBuild = true;
    installPhase = ''
      cp -r . $out/
    '';
  };

in
{

  services.eintopf = {
    enable = true;
    settings = {
      EINTOPF_THEMES = "eintopf,${template-karlsunruh}";
    };
  };

}