nixos/modules/desktop/wireguard/default.nix

26 lines
388 B
Nix
Raw Normal View History

2023-09-19 13:41:16 +04:00
{
outputs,
options,
config,
lib,
pkgs,
...
}:
2024-08-01 16:24:09 +04:00
let
2023-09-19 13:41:16 +04:00
cfg = config.modules.desktop.wireguard;
in {
options.modules.desktop.wireguard = {
2024-08-01 16:24:09 +04:00
enable = lib.mkEnableOption false;
2023-09-19 13:41:16 +04:00
};
2024-08-01 16:24:09 +04:00
config = lib.mkIf cfg.enable {
2023-09-19 13:41:16 +04:00
# todo declaritivly setting it up
networking.wireguard.enable = true;
environment.systemPackages = with pkgs; [
openresolv
];
2023-09-19 13:41:16 +04:00
};
}