aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/nixos/modules
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2019-11-16 16:44:53 +0100
committerKatharina Fey <kookie@spacekookie.de>2019-11-16 16:44:53 +0100
commitbdbea7489107d1251f9c8262df98db2dcb41842f (patch)
tree0aae7b08f570ac6d3276c88bf6e3eb53a0c48ddb /nixpkgs/nixos/modules
parent10a5d1a9784800903dede9c755c3e0a5c1d10424 (diff)
base/fish: Removing outdated paths, aliases and fixing `debug` alias
Diffstat (limited to 'nixpkgs/nixos/modules')
-rw-r--r--nixpkgs/nixos/modules/services/networking/mullvad-vpn.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/nixpkgs/nixos/modules/services/networking/mullvad-vpn.nix b/nixpkgs/nixos/modules/services/networking/mullvad-vpn.nix
new file mode 100644
index 00000000000..661c3b5085e
--- /dev/null
+++ b/nixpkgs/nixos/modules/services/networking/mullvad-vpn.nix
@@ -0,0 +1,32 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.services.mullvad-vpn;
+ dir = "/var/lib/mullvad-vpn";
+in
+{
+ options.services.mullvad-vpn = {
+ enable = mkEnableOption "the Mullvad VPN daemon";
+ };
+
+ config = mkIf cfg.enable {
+ systemd.services."mullvad-vpn" = {
+ enable = true;
+ wantedBy = [ "multi-user.target" ];
+ environment =
+ {
+ MULLVAD_SETTINGS_DIR = "${dir}";
+ # MULLVAD_RPC_SOCKET_PATH = "${dir}";
+ };
+ serviceConfig = {
+ DynamicUser = true;
+ RuntimeDirectory = "${dir}";
+ ExecStart = ''
+ ${pkgs.mullvad-vpn}/bin/mullvad-daemon --disable-log-to-file
+ '';
+ };
+ };
+ };
+}