pinwheel: Add enable option to mullvad module
This commit is contained in:
@@ -21,7 +21,9 @@ in
|
|||||||
|
|
||||||
git.enable = true;
|
git.enable = true;
|
||||||
zsh.enable = true;
|
zsh.enable = true;
|
||||||
|
|
||||||
openvpn.enable = true;
|
openvpn.enable = true;
|
||||||
|
mullvad.enable = true;
|
||||||
|
|
||||||
c.enable = true;
|
c.enable = true;
|
||||||
go.enable = true;
|
go.enable = true;
|
||||||
|
|||||||
@@ -1,19 +1,30 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
|
let
|
||||||
|
enabled = config.mod.mullvad.enable;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
services.mullvad-vpn = {
|
options = {
|
||||||
enable = true;
|
mod.mullvad = {
|
||||||
package = pkgs.mullvad-vpn;
|
enable = lib.mkEnableOption "enable mullvad module";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
age.secrets = {
|
config = lib.mkIf enabled {
|
||||||
"mullvad-device" = {
|
services.mullvad-vpn = {
|
||||||
file = ../../../../secrets/pinwheel/mullvad-device.age;
|
enable = true;
|
||||||
path = "/etc/mullvad-vpn/device.json";
|
package = pkgs.mullvad-vpn;
|
||||||
};
|
};
|
||||||
|
|
||||||
"mullvad-account-history" = {
|
age.secrets = {
|
||||||
file = ../../../../secrets/pinwheel/mullvad-account-history.age;
|
"mullvad-device" = {
|
||||||
path = "/etc/mullvad-vpn/account-history.json";
|
file = ../../../../secrets/pinwheel/mullvad-device.age;
|
||||||
|
path = "/etc/mullvad-vpn/device.json";
|
||||||
|
};
|
||||||
|
|
||||||
|
"mullvad-account-history" = {
|
||||||
|
file = ../../../../secrets/pinwheel/mullvad-account-history.age;
|
||||||
|
path = "/etc/mullvad-vpn/account-history.json";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user