From 02c8366331265f5b5f7139468d3cc5ea9ad0f14a Mon Sep 17 00:00:00 2001 From: kat witch Date: Sun, 8 Aug 2021 21:48:32 +0100 Subject: [PATCH] kw.dns Home fix --- config/modules/home/default.nix | 1 + config/modules/home/dns.nix | 39 +++++++++++++++++++++++++++++++++ config/profiles/base/home.nix | 2 +- 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 config/modules/home/dns.nix diff --git a/config/modules/home/default.nix b/config/modules/home/default.nix index a358084c..20d83201 100644 --- a/config/modules/home/default.nix +++ b/config/modules/home/default.nix @@ -5,6 +5,7 @@ imports = with (import (sources.nixexprs + "/modules")).home-manager; [ base16 syncplay konawall i3gopher weechat shell ] ++ [ ./vim.nix ./fvwm.nix + ./dns.nix ./deploy.nix ./theme.nix ./secrets.nix diff --git a/config/modules/home/dns.nix b/config/modules/home/dns.nix new file mode 100644 index 00000000..db56259e --- /dev/null +++ b/config/modules/home/dns.nix @@ -0,0 +1,39 @@ +{ config, superConfig, lib, tf, ... }: + +/* +This module: +* Provides options for setting the domain/tld/... used by default in my service configs. +*/ + +with lib; + +{ + options.kw.dns = { + email = mkOption { + type = types.nullOr types.str; + default = ""; + }; + tld = mkOption { + type = types.nullOr types.str; + default = ""; + }; + domain = mkOption { + type = types.nullOr types.str; + default = ""; + }; + ygg_prefix = mkOption { + type = types.nullOr types.str; + default = ""; + }; + ipv4 = mkOption { + type = types.str; + }; + ipv6 = mkOption { + type = types.str; + }; + dynamic = mkEnableOption "Enable Glauca Dynamic DNS Updater"; + }; + config = { + kw.dns = superConfig.kw.dns; + }; +} diff --git a/config/profiles/base/home.nix b/config/profiles/base/home.nix index 20544eb4..7f93afa1 100644 --- a/config/profiles/base/home.nix +++ b/config/profiles/base/home.nix @@ -5,7 +5,7 @@ with lib; { options.home-manager.users = mkOption { type = types.attrsOf (types.submoduleWith { - modules = [ ../../modules/home ]; + modules = singleton ../../modules/home; specialArgs = { inherit sources tf; superConfig = config;