about summary refs log tree commit diff
path: root/modules/nixos/murmur.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/nixos/murmur.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/modules/nixos/murmur.nix b/modules/nixos/murmur.nix
new file mode 100644
index 0000000..cbd90d4
--- /dev/null
+++ b/modules/nixos/murmur.nix
@@ -0,0 +1,28 @@
+{
+  config,
+  inputs,
+  lib,
+  ...
+}:
+with lib; let
+  cfg = config.nixfiles.modules.murmur;
+in {
+  options.nixfiles.modules.murmur.enable = mkEnableOption "Murmur";
+
+  config = mkIf cfg.enable {
+    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