about summary refs log tree commit diff
path: root/modules/homelab
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2023-05-08 19:04:26 -0700
committerFranck Cuny <franck@fcuny.net>2023-05-08 19:09:01 -0700
commitcf9158ab77cbfa701a60f485d3c2bc8de9a894e0 (patch)
treeedbc3c305fec67bf3bff65915d8eefbfeae3e5e9 /modules/homelab
parenthome: get rid of mail / gpg modules (diff)
downloadworld-cf9158ab77cbfa701a60f485d3c2bc8de9a894e0.tar.gz
module for homelab
Diffstat (limited to 'modules/homelab')
-rw-r--r--modules/homelab/default.nix4
-rw-r--r--modules/homelab/domain.nix17
2 files changed, 21 insertions, 0 deletions
diff --git a/modules/homelab/default.nix b/modules/homelab/default.nix
new file mode 100644
index 0000000..d60b99f
--- /dev/null
+++ b/modules/homelab/default.nix
@@ -0,0 +1,4 @@
+{ ... }:
+{
+  imports = [ ./domain.nix ];
+}
diff --git a/modules/homelab/domain.nix b/modules/homelab/domain.nix
new file mode 100644
index 0000000..2f0acfa
--- /dev/null
+++ b/modules/homelab/domain.nix
@@ -0,0 +1,17 @@
+{ lib, config, self, ... }:
+let
+  inherit (builtins) readFile fromTOML;
+in
+{
+  options = with lib; {
+    homelab.domain = mkOption {
+      type = types.str;
+      default = null;
+      description = "Domain";
+    };
+  };
+
+  config = {
+    homelab.domain = (fromTOML (readFile "${self}/configs/homelab.toml")).domain;
+  };
+}