birdsong: rename option peer -> peering
This commit is contained in:
parent
70247124a6
commit
d17ef00e1c
|
@ -11,7 +11,7 @@
|
|||
|
||||
age.secrets.wireguard-peer-orm.file = ../../secrets/wireguard-peer-orm.age;
|
||||
|
||||
birdsong.peer = {
|
||||
birdsong.peering = {
|
||||
enable = true;
|
||||
privateKeyFile = config.age.secrets.wireguard-peer-orm.path;
|
||||
};
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
age.secrets.wireguard-peer-tohru.file = ../../secrets/wireguard-peer-tohru.age;
|
||||
|
||||
birdsong.peer = {
|
||||
birdsong.peering = {
|
||||
enable = true;
|
||||
privateKeyFile = config.age.secrets.wireguard-peer-tohru.path;
|
||||
persistentKeepalive = 23;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
age.secrets.wireguard-peer-yevaud.file = ../../secrets/wireguard-peer-yevaud.age;
|
||||
|
||||
birdsong.peer = {
|
||||
birdsong.peering = {
|
||||
enable = true;
|
||||
privateKeyFile = config.age.secrets.wireguard-peer-yevaud.path;
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./peer.nix
|
||||
./hosts.nix
|
||||
./peering.nix
|
||||
];
|
||||
}
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.birdsong.peer;
|
||||
cfg = config.birdsong.peering;
|
||||
hostName = if null != cfg.hostName then cfg.hostName else config.networking.hostName;
|
||||
hosts = config.birdsong.hosts;
|
||||
host = hosts.${hostName};
|
||||
in
|
||||
{
|
||||
options.birdsong.peer = {
|
||||
options.birdsong.peering = {
|
||||
enable = mkEnableOption "WireGuard peering with the birdsong network";
|
||||
hostName = mkOption {
|
||||
default = null;
|
||||
|
@ -53,11 +53,11 @@ in
|
|||
assertions = [
|
||||
{
|
||||
assertion = cfg ? privateKeyFile;
|
||||
message = "birdsong.peer.privateKeyFile must be set";
|
||||
message = "birdsong.peering.privateKeyFile must be set";
|
||||
}
|
||||
{
|
||||
assertion = hostName != null;
|
||||
message = "birdsong.peer.hostName or networking.hostName must be set";
|
||||
message = "birdsong.peering.hostName or networking.hostName must be set";
|
||||
}
|
||||
];
|
||||
|
Loading…
Reference in a new issue