This commit is contained in:
2023-12-05 12:11:46 +01:00
parent 855bd4d3ec
commit cb8e2526e3
2 changed files with 9 additions and 27 deletions

View File

@@ -3,25 +3,7 @@ let
inherit (lib) types;
in
{
options.cids = {
uids = lib.mkOption {
readOnly = true;
description = lib.mdDoc ''
The user IDs used for containers.
'';
type = types.attrsOf types.int;
};
gids = lib.mkOption {
readOnly = true;
description = lib.mdDoc ''
The group IDs used for containers.
'';
type = types.attrsOf types.int;
};
};
config = {
cids = {
ids = {
uids = {
unbound = 10001;
};
@@ -29,5 +11,4 @@ in
unbound = 10001;
};
};
};
}

View File

@@ -1,5 +1,6 @@
{ config, ... }:
let
cids = import ../modules/staticids.nix;
domain = "ns.cloonar.com";
cfg = {
server = {
@@ -136,7 +137,7 @@ in {
uid = cids.uids.unbound;
};
users.groups.unbound = {
gid = config.cids.gids.unbound;
gid = cids.gids.unbound;
};
security.acme.certs."${domain}" = {
@@ -175,10 +176,10 @@ in {
users.users.unbound = {
group = "unbound";
isSystemUser = true;
uid = config.cids.uids.unbound;
uid = cids.uids.unbound;
};
users.groups.unbound = {
gid = config.cids.gids.unbound;
gid = cids.gids.unbound;
};
services.unbound = {
enable = true;