about summary refs log tree commit diff
path: root/modules/murmur.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2024-04-21 02:15:42 +0300
committerAzat Bahawi <azat@bahawi.net>2024-04-21 02:15:42 +0300
commite6ed60548397627bf10f561f9438201dbba0a36e (patch)
treef9a84c5957d2cc4fcd148065ee9365a0c851ae1c /modules/murmur.nix
parent2024-04-18 (diff)
2024-04-21
Diffstat (limited to 'modules/murmur.nix')
-rw-r--r--modules/murmur.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/modules/murmur.nix b/modules/murmur.nix
new file mode 100644
index 0000000..7621c9e
--- /dev/null
+++ b/modules/murmur.nix
@@ -0,0 +1,32 @@
+{
+  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