services/unbound: use u/gname instead of u/gid

This commit is contained in:
LavaDesu 2022-02-24 13:22:35 +07:00
parent a76b82cbcc
commit 59a48fc8bb
Signed by: cilly
GPG key ID: 6500251E087653C9

View file

@ -1,14 +1,12 @@
{ config, 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}" ];
systemd.tmpfiles.rules = [ "d ${dir} 700 unbound unbound" ];
services.unbound = {
enable = true;