birdsong: rename option peer -> peering

This commit is contained in:
Katherina Walshe-Grey 2024-07-25 08:14:41 +01:00
parent 70247124a6
commit d17ef00e1c
5 changed files with 8 additions and 8 deletions

View file

@ -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;
};

View file

@ -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;

View file

@ -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;
};

View file

@ -1,6 +1,6 @@
{
imports = [
./peer.nix
./hosts.nix
./peering.nix
];
}

View file

@ -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";
}
];