workstations: Add mullvad-vpn

This commit is contained in:
Victor Mignot 2025-01-09 12:24:44 +01:00
parent 6a27d8574d
commit 8165007ed4
Signed by: dala
SSH key fingerprint: SHA256:+3O9MhlDc2tJL0n+E+Myr7nL+74DP9AXdIXHmIqZTkY
4 changed files with 29 additions and 0 deletions

View file

@ -18,6 +18,8 @@
wg0Private.file = ../../secrets/fuyuki-wg0.age; wg0Private.file = ../../secrets/fuyuki-wg0.age;
}; };
my.connection.vpn.enable = true;
my.users = { my.users = {
dala = { dala = {
description = "Dala"; description = "Dala";

View file

@ -54,6 +54,8 @@
]; ];
}; };
my.connection.vpn.enable = true;
# User config # User config
my.users = { my.users = {
dala = { dala = {

View file

@ -14,6 +14,7 @@
./bluetooth.nix ./bluetooth.nix
./wireshark.nix ./wireshark.nix
./ssh.nix ./ssh.nix
./vpn.nix
]; ];
config = config =

View file

@ -0,0 +1,24 @@
{
pkgs,
lib,
config,
...
}:
let
vpnConfigEnable = config.my.connection.vpn.enable;
in
with lib;
{
options.my.connection.vpn.enable = mkOption {
type = types.bool;
default = false;
description = "Enable the Mullvad VPN stack.";
};
config = mkIf vpnConfigEnable {
services.mullvad-vpn = {
enable = true;
package = pkgs.mullvad-vpn;
};
};
}