System Gen159 @ 2025-04-23-00:25:53

This commit is contained in:
2025-04-23 00:25:54 +02:00
parent 376909ae22
commit 99e902a08d
9 changed files with 182 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
{
config,
lib,
...
}: let
cfg = config.networking.wg.client;
peers = import ./peers.nix {};
in {
options.networking.wg.client = {
enable = lib.mkEnableOption "Enable WireGuard client";
privateKeyFile = lib.mkOption {
type = lib.types.path;
description = "Path to the private key file for the WireGuard client";
};
};
config = lib.mkIf cfg.enable {
networking.wg-quick.interfaces.wg0 = {
inherit (peers.jonas) address;
inherit (cfg) privateKeyFile;
peers = [
peers.harbor
];
};
};
}