services/unbound: create stateDir

This commit is contained in:
LavaDesu 2022-02-24 13:16:07 +07:00
parent 40f3f9b11f
commit 6504f559c5
Signed by: cilly
GPG key ID: 6500251E087653C9

View file

@ -1,11 +1,18 @@
{ inputs, ... }: {
{ inputs, ... }:
let
dir = "/persist/unbound";
uid = toString config.ids.uids.unbound;
gid = toString config.ids.gids.unbound;
in {
networking.firewall.interfaces.wlan0 = {
allowedUDPPorts = [ 53 ];
allowedTCPPorts = [ 53 ];
};
systemd.tmpfiles.rules = [ "d ${dir} 700 ${uid} ${gid}" ];
services.unbound = {
enable = true;
stateDir = "/persist/unbound";
stateDir = dir;
settings = {
forward-zone = [{
name = ".";