Skip to content

Commit

Permalink
knot: drop dynamic user
Browse files Browse the repository at this point in the history
This makes it hard to include secret files.
Also using tools like keymgr becomes harder.
  • Loading branch information
Mic92 committed Feb 12, 2020
1 parent 6adc09e commit 88029bc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion nixos/modules/services/networking/knot.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ in {
};

config = mkIf config.services.knot.enable {
users.users.knot = {
isSystemUser = true;
group = "knot";
description = "Knot daemon user";
};

users.groups.knot.gid = null;
systemd.services.knot = {
unitConfig.Documentation = "man:knotd(8) man:knot.conf(5) man:knotc(8) https://www.knot-dns.cz/docs/${cfg.package.version}/html/";
description = cfg.package.meta.description;
Expand All @@ -79,7 +86,7 @@ in {
CapabilityBoundingSet = "CAP_NET_BIND_SERVICE CAP_SETPCAP";
AmbientCapabilities = "CAP_NET_BIND_SERVICE CAP_SETPCAP";
NoNewPrivileges = true;
DynamicUser = "yes";
User = "knot";
RuntimeDirectory = "knot";
StateDirectory = "knot";
StateDirectoryMode = "0700";
Expand Down

0 comments on commit 88029bc

Please sign in to comment.