about summary refs log tree commit diff
path: root/users/sterni/machines/edwin/http/flipdot.openlab-augsburg.de.nix
blob: c86956a0a473556f14dc4a172a1020a0c3b0d5ec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ depot, lib, config, ... }:

let
  inherit (depot.users.sterni.external.flipdot-gschichtler)
    bahnhofshalle
    warteraum
    nixosModule
    ;
in

{
  imports = [
    nixosModule
    ./nginx.nix
  ];

  config = {
    age.secrets = lib.genAttrs [
      "warteraum-salt"
      "warteraum-tokens"
    ]
      (name: {
        file = depot.users.sterni.secrets."${name}.age";
      });

    services.flipdot-gschichtler = {
      enable = true;
      virtualHost = "flipdot.openlab-augsburg.de";
      packages = {
        inherit bahnhofshalle warteraum;
      };
      saltFile = config.age.secretsDir + "/warteraum-salt";
      tokensFile = config.age.secretsDir + "/warteraum-tokens";
    };
  };
}