-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
75e579b
commit 7a06117
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
let | ||
hostCfg = config.hosts.ni; | ||
cfg = hostCfg.services.dns-server; | ||
in | ||
{ | ||
options.hosts.ni.services.dns-server.enable = | ||
lib.mkEnableOption "preferred DNS server"; | ||
|
||
config = lib.mkIf cfg.enable { | ||
services.nsd = { | ||
enable = true; | ||
ipv4 = true; | ||
ipv6 = true; | ||
|
||
zones."foodogsquared.internal".data = '' | ||
$ORIGIN foodogsquared.internal. | ||
$TTL 3600 | ||
@ IN SOA ns1.foodogsquared.internal. admin@foodogsquared.one. ( | ||
2025010101 ;Serial | ||
3600 ;Refresh | ||
3600 ;Retry | ||
3600 ;Expire | ||
3600 ;Negative response caching TTL | ||
) | ||
3600 IN NS ns1.foodogsquared.internal. | ||
ni 3600 IN A 127.0.0.1. | ||
ns1 3600 IN A 127.0.0.1. | ||
rss 3600 IN A 127.0.0.1. | ||
''; | ||
}; | ||
|
||
security.ipa = { | ||
enable = true; | ||
domain = "foodogsquared.internal"; | ||
dyndns.enable = true; | ||
}; | ||
}; | ||
} |