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;
|
2024-09-26 10:02:15 +04:00
|
|
|
|
2024-09-26 13:28:18 +04:00
|
|
|
users.users.sako.packages = with pkgs; [
|
2024-09-26 10:02:15 +04:00
|
|
|
openresolv
|
|
|
|
];
|
|
|
|
|
2023-09-19 13:41:16 +04:00
|
|
|
};
|
|
|
|
}
|