fix cids
This commit is contained in:
@@ -3,31 +3,12 @@ let
|
|||||||
inherit (lib) types;
|
inherit (lib) types;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.cids = {
|
ids = {
|
||||||
uids = lib.mkOption {
|
uids = {
|
||||||
readOnly = true;
|
unbound = 10001;
|
||||||
description = lib.mdDoc ''
|
|
||||||
The user IDs used for containers.
|
|
||||||
'';
|
|
||||||
type = types.attrsOf types.int;
|
|
||||||
};
|
};
|
||||||
|
gids = {
|
||||||
gids = lib.mkOption {
|
unbound = 10001;
|
||||||
readOnly = true;
|
|
||||||
description = lib.mdDoc ''
|
|
||||||
The group IDs used for containers.
|
|
||||||
'';
|
|
||||||
type = types.attrsOf types.int;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = {
|
|
||||||
cids = {
|
|
||||||
uids = {
|
|
||||||
unbound = 10001;
|
|
||||||
};
|
|
||||||
gids = {
|
|
||||||
unbound = 10001;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
let
|
let
|
||||||
|
cids = import ../modules/staticids.nix;
|
||||||
domain = "ns.cloonar.com";
|
domain = "ns.cloonar.com";
|
||||||
cfg = {
|
cfg = {
|
||||||
server = {
|
server = {
|
||||||
@@ -136,7 +137,7 @@ in {
|
|||||||
uid = cids.uids.unbound;
|
uid = cids.uids.unbound;
|
||||||
};
|
};
|
||||||
users.groups.unbound = {
|
users.groups.unbound = {
|
||||||
gid = config.cids.gids.unbound;
|
gid = cids.gids.unbound;
|
||||||
};
|
};
|
||||||
|
|
||||||
security.acme.certs."${domain}" = {
|
security.acme.certs."${domain}" = {
|
||||||
@@ -175,10 +176,10 @@ in {
|
|||||||
users.users.unbound = {
|
users.users.unbound = {
|
||||||
group = "unbound";
|
group = "unbound";
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
uid = config.cids.uids.unbound;
|
uid = cids.uids.unbound;
|
||||||
};
|
};
|
||||||
users.groups.unbound = {
|
users.groups.unbound = {
|
||||||
gid = config.cids.gids.unbound;
|
gid = cids.gids.unbound;
|
||||||
};
|
};
|
||||||
services.unbound = {
|
services.unbound = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user