Build Dnsmasq with nix-snapshotter
This commit is contained in:
parent
782b2e1c45
commit
ab3a068066
9 changed files with 165 additions and 58 deletions
21
nixng-configurations/default.nix
Normal file
21
nixng-configurations/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
self,
|
||||
flake-utils,
|
||||
nixng,
|
||||
nixpkgs,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
images = {
|
||||
dnsmasq = ./dnsmasq.nix;
|
||||
};
|
||||
in {
|
||||
nixngConfigurations = builtins.mapAttrs (name: configFile:
|
||||
nixng.nglib.makeSystem {
|
||||
inherit nixpkgs system;
|
||||
name = "nixng-${name}";
|
||||
specialArgs = {inherit (self) globals;};
|
||||
config = import configFile;
|
||||
})
|
||||
images;
|
||||
})
|
28
nixng-configurations/dnsmasq.nix
Normal file
28
nixng-configurations/dnsmasq.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{globals, ...}: {
|
||||
dinit.enable = true;
|
||||
init.services.dnsmasq.shutdownOnExit = true;
|
||||
|
||||
services.dnsmasq = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
address = [
|
||||
"/kms.kun.is/${globals.kmsIPv4}"
|
||||
"/ssh.git.kun.is/${globals.gitIPv4}"
|
||||
];
|
||||
|
||||
alias = "${globals.routerPublicIPv4},${globals.traefikIPv4}";
|
||||
expand-hosts = true;
|
||||
local = "/dmz/";
|
||||
log-queries = true;
|
||||
no-hosts = true;
|
||||
no-resolv = true;
|
||||
port = 53;
|
||||
|
||||
server = [
|
||||
"192.168.30.1"
|
||||
"/kun.is/${globals.bind9IPv4}"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue