commit d66d2af43ab6e9f8faaedc6f2b702a9c49a625e8
parent c792b99fa91068dda6340f88162cac40e873d142
Author: Francesco Saccone <francesco@francescosaccone.com>
Date: Thu, 15 May 2025 09:13:29 +0200
refactor: move bind from 'modules' to 'services'
Signed-off-by: Francesco Saccone <francesco@francescosaccone.com>
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/nixos/bind/default.nix b/modules/nixos/bind/default.nix
@@ -6,7 +6,7 @@
...
}:
{
- options.modules.bind = {
+ options.services.bind = {
enable = lib.mkOption {
description = "Whether to enable BIND.";
default = false;
@@ -48,15 +48,15 @@
};
};
- config = lib.mkIf config.modules.bind.enable {
+ config = lib.mkIf config.services.bind.enable {
services.bind = {
enable = true;
package = pkgs.bind;
- zones.${config.modules.bind.domain} = {
+ zones.${config.services.bind.domain} = {
master = true;
file =
- config.modules.bind.records
+ config.services.bind.records
|> builtins.map (
{
name,
@@ -66,7 +66,7 @@
data,
}:
let
- inherit (config.modules.bind) domain;
+ inherit (config.services.bind) domain;
subdomain = if name != "@" then "${name}." else "";
in
[
@@ -79,7 +79,7 @@
|> builtins.concatStringsSep " "
)
|> builtins.concatStringsSep "\n"
- |> pkgs.writeText "${config.modules.bind.domain}";
+ |> pkgs.writeText "${config.services.bind.domain}";
};
};