about summary refs log tree commit diff
path: root/modules/nixos/murmur.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-03-11 12:51:58 +0300
committerAzat Bahawi <azat@bahawi.net>2023-03-11 12:51:58 +0300
commit0ef23d4501592a192ba020a2ac34abb1a3d8fc5e (patch)
tree17f0377d71f7c645acf8502c769a0ade76cbc901 /modules/nixos/murmur.nix
parent2023-02-20 (diff)
2023-03-11
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