Move mergeNncpSettings setting

This commit is contained in:
Sandro - 2023-05-21 15:37:27 +02:00
parent 50cc0db69c
commit ec567ffbfa
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
2 changed files with 14 additions and 13 deletions

View File

@ -15,7 +15,7 @@
autoNetSetup = false; autoNetSetup = false;
}; };
hq.statistics.enable = true; hq.statistics.enable = true;
mergeNncpSettings = false; nncp.mergeSettings = false;
}; };
system.stateVersion = "22.05"; system.stateVersion = "22.05";

View File

@ -38,11 +38,6 @@ let
in in
{ {
options.c3d2 = { options.c3d2 = {
mergeNncpSettings = lib.mkEnableOption ''
Whether to merge <literal>c3d2.nncp.<>.nncp</literal>
into <literal>programs.nncp.settings</literal>.
'';
k-ot.enable = lib.mkEnableOption '' k-ot.enable = lib.mkEnableOption ''
Add k-ot user to this machine. Anyone with an SSH key listed in Add k-ot user to this machine. Anyone with an SSH key listed in
<literal>c3d2.users</literal> can log in as this user. <literal>c3d2.users</literal> can log in as this user.
@ -65,13 +60,19 @@ in
}; };
}; };
nncp.neigh = lib.mkOption { nncp = {
type = with lib.types; attrsOf neighMod; mergeSettings = lib.mkEnableOption ''
default = { }; Whether to merge <literal>c3d2.nncp.<>.nncp</literal>
description = '' into <literal>programs.nncp.settings</literal>.
Attrset of NNCP neighbours for relaying packets.
User endpoints go in <literal>c3d2.users</literal>.
''; '';
neigh = lib.mkOption {
type = with lib.types; attrsOf neighMod;
default = { };
description = ''
Attrset of NNCP neighbours for relaying packets.
User endpoints go in <literal>c3d2.users</literal>.
'';
};
}; };
sshKeys = lib.mkOption { sshKeys = lib.mkOption {
@ -81,7 +82,7 @@ in
}; };
config = { config = {
programs.nncp.settings = lib.optionalAttrs cfg.mergeNncpSettings cfg.nncp; programs.nncp.settings = lib.optionalAttrs cfg.nncp.mergeSettings cfg.nncp;
users = users =
let let