diff --git a/hosts/del/configuration.nix b/hosts/del/configuration.nix index 5178387..7d63b58 100644 --- a/hosts/del/configuration.nix +++ b/hosts/del/configuration.nix @@ -73,11 +73,6 @@ }; services = { - mullvad-vpn = { - enable = true; - package = pkgs.mullvad-vpn; - }; - pcscd.enable = true; udisks2.enable = true; diff --git a/hosts/del/profile.nix b/hosts/del/profile.nix index 1159a08..b5823b0 100644 --- a/hosts/del/profile.nix +++ b/hosts/del/profile.nix @@ -10,6 +10,7 @@ _: { ../../options/desktop/bluetooth.nix ../../options/desktop/dev/malloc-perturb.nix ../../options/desktop/fonts.nix + ../../options/desktop/mullvad-vpn.nix ../../options/desktop/opentabletdriver.nix ../../options/desktop/power-supply.nix ../../options/desktop/suspend.nix diff --git a/hosts/niks/configuration.nix b/hosts/niks/configuration.nix index 930d8bc..de596ed 100644 --- a/hosts/niks/configuration.nix +++ b/hosts/niks/configuration.nix @@ -52,11 +52,6 @@ }; services = { - mullvad-vpn = { - enable = true; - package = pkgs.mullvad-vpn; - }; - pcscd.enable = true; udisks2.enable = true; diff --git a/hosts/niks/default.nix b/hosts/niks/default.nix index e0a85c7..de26979 100644 --- a/hosts/niks/default.nix +++ b/hosts/niks/default.nix @@ -3,7 +3,6 @@ _: { ./configuration.nix ./fcitx5.nix ./hardware-configuration.nix - #./mullvad.nix ./profile.nix ./programs.nix #./restic.nix diff --git a/hosts/niks/mullvad.nix b/hosts/niks/mullvad.nix deleted file mode 100644 index 6a08b76..0000000 --- a/hosts/niks/mullvad.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ - config, - pkgs, - ... -}: { - environment.systemPackages = with pkgs; [ mullvad-vpn mullvad ]; - - networking.wireguard.enable = true; - networking.iproute2.enable = true; - - services.mullvad-vpn = { - enable = true; - package = pkgs.mullvad-vpn; - }; - - systemd.services."mullvad-daemon".postStart = let - mullvad = config.services.mullvad-vpn.package; - in '' - while ! ${mullvad}/bin/mullvad status > /dev/null; do sleep 1; done - ${mullvad}/bin/mullvad auto-connect set on - ${mullvad}/bin/mullvad tunnel ipv6 set on - ${mullvad}/bin/mullvad set default --block-ads --block-trackers --block-malware - ''; -} diff --git a/hosts/niks/profile.nix b/hosts/niks/profile.nix index 7b766c2..d8751e2 100644 --- a/hosts/niks/profile.nix +++ b/hosts/niks/profile.nix @@ -13,6 +13,7 @@ _: { ../../options/desktop/bluetooth.nix ../../options/desktop/dev/malloc-perturb.nix ../../options/desktop/fonts.nix + ../../options/desktop/mullvad-vpn.nix ../../options/desktop/opentabletdriver.nix ../../options/desktop/power-supply.nix ../../options/desktop/suspend.nix diff --git a/options/desktop/mullvad-vpn.nix b/options/desktop/mullvad-vpn.nix new file mode 100644 index 0000000..3d35628 --- /dev/null +++ b/options/desktop/mullvad-vpn.nix @@ -0,0 +1,9 @@ +{ + pkgs, + ... +}: { + services.mullvad-vpn = { + enable = true; + package = pkgs.mullvad-vpn; + }; +}