about summary refs log tree commit diff
path: root/users/tazjin/nixos/modules/monica.nix
blob: 493bffb2f986718ca964edf0ce2d792a8c24444e (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
# Host the Monica personal CRM software.
{ depot, config, ... }:

{
  imports = [
    (depot.third_party.agenix.src + "/modules/age.nix")
  ];

  age.secrets.monica-appkey = {
    group = config.services.monica.group;
    file = depot.users.tazjin.secrets."monica-appkey.age";
    mode = "0440";
  };

  services.monica = {
    enable = true;
    hostname = "monica.tazj.in";
    appKeyFile = "/run/agenix/monica-appkey";
    database.createLocally = true;

    nginx = {
      enableACME = true;
      forceSSL = true;
    };
  };
}