mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 20:09:07 +01:00
Avoid usage of lib.types.anything
This commit is contained in:
parent
7557252b22
commit
e69e9c8491
5 changed files with 6 additions and 6 deletions
|
|
@ -26,7 +26,7 @@ in
|
||||||
default = "${self}/users/${config.home.username}/@${osConfig.networking.hostName}/secrets.json";
|
default = "${self}/users/${config.home.username}/@${osConfig.networking.hostName}/secrets.json";
|
||||||
};
|
};
|
||||||
secretsData = lib.mkOption {
|
secretsData = lib.mkOption {
|
||||||
type = lib.types.anything;
|
type = lib.types.attrs;
|
||||||
default = cfg.secretsFile |> lib.readFile |> lib.strings.fromJSON;
|
default = cfg.secretsFile |> lib.readFile |> lib.strings.fromJSON;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes = lib.mkOption {
|
nodes = lib.mkOption {
|
||||||
type = lib.types.anything;
|
type = lib.types.listOf lib.types.attrs;
|
||||||
default =
|
default =
|
||||||
allHosts
|
allHosts
|
||||||
|> lib.attrValues
|
|> lib.attrValues
|
||||||
|
|
@ -31,7 +31,7 @@ in
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
};
|
};
|
||||||
peers = lib.mkOption {
|
peers = lib.mkOption {
|
||||||
type = lib.types.anything;
|
type = lib.types.listOf lib.types.attrs;
|
||||||
default = cfg.nodes |> lib.filter (node: node.hostName != cfg.hostName);
|
default = cfg.nodes |> lib.filter (node: node.hostName != cfg.hostName);
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
dnsServers = lib.mkOption {
|
dnsServers = lib.mkOption {
|
||||||
type = lib.types.anything;
|
type = lib.types.listOf lib.types.nonEmptyStr;
|
||||||
default =
|
default =
|
||||||
allHosts
|
allHosts
|
||||||
|> lib.attrValues
|
|> lib.attrValues
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ in
|
||||||
default = [ ];
|
default = [ ];
|
||||||
};
|
};
|
||||||
extraConfig = lib.mkOption {
|
extraConfig = lib.mkOption {
|
||||||
type = lib.types.attrsOf lib.types.anything;
|
type = lib.types.attrs;
|
||||||
default = { };
|
default = { };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ in
|
||||||
default = "${self}/hosts/${config.networking.hostName}/secrets.json";
|
default = "${self}/hosts/${config.networking.hostName}/secrets.json";
|
||||||
};
|
};
|
||||||
secretsData = lib.mkOption {
|
secretsData = lib.mkOption {
|
||||||
type = lib.types.anything;
|
type = lib.types.attrs;
|
||||||
default = cfg.secretsFile |> lib.readFile |> lib.strings.fromJSON;
|
default = cfg.secretsFile |> lib.readFile |> lib.strings.fromJSON;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue