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;
|
age.secrets.wireguard-peer-orm.file = ../../secrets/wireguard-peer-orm.age;
|
||||||
|
|
||||||
birdsong.peer = {
|
birdsong.peering = {
|
||||||
enable = true;
|
enable = true;
|
||||||
privateKeyFile = config.age.secrets.wireguard-peer-orm.path;
|
privateKeyFile = config.age.secrets.wireguard-peer-orm.path;
|
||||||
};
|
};
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
age.secrets.wireguard-peer-tohru.file = ../../secrets/wireguard-peer-tohru.age;
|
age.secrets.wireguard-peer-tohru.file = ../../secrets/wireguard-peer-tohru.age;
|
||||||
|
|
||||||
birdsong.peer = {
|
birdsong.peering = {
|
||||||
enable = true;
|
enable = true;
|
||||||
privateKeyFile = config.age.secrets.wireguard-peer-tohru.path;
|
privateKeyFile = config.age.secrets.wireguard-peer-tohru.path;
|
||||||
persistentKeepalive = 23;
|
persistentKeepalive = 23;
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
age.secrets.wireguard-peer-yevaud.file = ../../secrets/wireguard-peer-yevaud.age;
|
age.secrets.wireguard-peer-yevaud.file = ../../secrets/wireguard-peer-yevaud.age;
|
||||||
|
|
||||||
birdsong.peer = {
|
birdsong.peering = {
|
||||||
enable = true;
|
enable = true;
|
||||||
privateKeyFile = config.age.secrets.wireguard-peer-yevaud.path;
|
privateKeyFile = config.age.secrets.wireguard-peer-yevaud.path;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./peer.nix
|
|
||||||
./hosts.nix
|
./hosts.nix
|
||||||
|
./peering.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.birdsong.peer;
|
cfg = config.birdsong.peering;
|
||||||
hostName = if null != cfg.hostName then cfg.hostName else config.networking.hostName;
|
hostName = if null != cfg.hostName then cfg.hostName else config.networking.hostName;
|
||||||
hosts = config.birdsong.hosts;
|
hosts = config.birdsong.hosts;
|
||||||
host = hosts.${hostName};
|
host = hosts.${hostName};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.birdsong.peer = {
|
options.birdsong.peering = {
|
||||||
enable = mkEnableOption "WireGuard peering with the birdsong network";
|
enable = mkEnableOption "WireGuard peering with the birdsong network";
|
||||||
hostName = mkOption {
|
hostName = mkOption {
|
||||||
default = null;
|
default = null;
|
||||||
|
@ -53,11 +53,11 @@ in
|
||||||
assertions = [
|
assertions = [
|
||||||
{
|
{
|
||||||
assertion = cfg ? privateKeyFile;
|
assertion = cfg ? privateKeyFile;
|
||||||
message = "birdsong.peer.privateKeyFile must be set";
|
message = "birdsong.peering.privateKeyFile must be set";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
assertion = hostName != null;
|
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