about summary refs log tree commit diff
path: root/modules/nixos/murmur.nix
blob: 8ac78990d8299f9fd8bdd1eeb4ec9c35be3ba5f1 (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
{
  config,
  inputs,
  lib,
  ...
}:
with lib; let
  cfg = config.nixfiles.modules.murmur;
in {
  options.nixfiles.modules.murmur.enable = mkEnableOption "Murmur";

  config = mkIf cfg.enable {
    ark.directories = ["/var/lib/murmur"];

    secrets.murmur-environment = {
      file = "${inputs.self}/secrets/murmur-environment";
      owner = "murmur";
      group = "murmur";
    };

    services.murmur = {
      enable = true;
      openFirewall = true;
      logDays = -1;
      registerName = mkDefault my.domain.shire;
      password = "$MURMUR_PASSWORD";
      environmentFile = config.secrets."murmur-environment".path;
    };
  };
}

Consider giving Nix/NixOS a try! <3