feat: several updates
This commit is contained in:
@@ -218,6 +218,7 @@ in
|
||||
options = {
|
||||
ip_prefix = mkOption { type = str; };
|
||||
cidr = mkOption { type = int; };
|
||||
mask = mkOption { type = str; }; # TODO: Build from cidr
|
||||
gateway = mkOption { type = str; };
|
||||
domains = mkOption {
|
||||
type = submodule {
|
||||
@@ -232,7 +233,7 @@ in
|
||||
options = {
|
||||
login = mkOption { type = str; };
|
||||
email = mkOption { type = str; };
|
||||
public_ssh_key = mkOption { type = str; };
|
||||
public_ssh_keys = mkOption { type = listOf str; };
|
||||
initial_htpasswd = mkOption { type = str; };
|
||||
};
|
||||
};
|
||||
@@ -251,9 +252,8 @@ in
|
||||
dns_provider = mkOption { type = str; };
|
||||
|
||||
other_hosts = mkOption {
|
||||
type = listOf (submodule {
|
||||
type = attrsOf (submodule {
|
||||
options = {
|
||||
hostname = mkOption { type = str; };
|
||||
private = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
@@ -262,9 +262,24 @@ in
|
||||
type = bool;
|
||||
default = true;
|
||||
};
|
||||
addr = mkOption {
|
||||
# addr = mkOption {
|
||||
# type = str;
|
||||
# description = "ip:port for the service";
|
||||
# };
|
||||
protocol = mkOption {
|
||||
type = str;
|
||||
description = "ip:port for the service";
|
||||
default = "http";
|
||||
};
|
||||
ip = mkOption {
|
||||
type = int;
|
||||
};
|
||||
port = mkOption {
|
||||
type = nullOr int;
|
||||
default = null;
|
||||
};
|
||||
mac = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
};
|
||||
useCustomCA = mkOption {
|
||||
type = bool;
|
||||
@@ -311,12 +326,15 @@ in
|
||||
(mergeConf (
|
||||
lib.attrValues (
|
||||
lib.mapAttrs (
|
||||
secretName': _:
|
||||
secretName': entry:
|
||||
let
|
||||
secretName = lib.removeSuffix ".age" secretName';
|
||||
in
|
||||
{
|
||||
age.secrets.${secretName}.file = ../secrets/${secretName'};
|
||||
age.secrets.${secretName} = {
|
||||
file = ../secrets/${secretName'};
|
||||
}
|
||||
// (entry.extra or { });
|
||||
}
|
||||
) (lib.filterAttrs (_: entry: builtins.elem ownKey entry.publicKeys) secrets)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user