From 5d738414d3056171ac5ccb34445db2d79dd792f1 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Sat, 23 Sep 2023 18:17:48 -0400 Subject: add openvpn config for my mullad vpn stuff --- .gitignore | 1 + home/jon/home.nix | 3 +++ programs/openvpn.nix | 10 ++++++++++ systems/default.nix | 7 ++++++- 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 programs/openvpn.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..db2fc0d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +secrets diff --git a/home/jon/home.nix b/home/jon/home.nix index 7957beb..a53fdd5 100644 --- a/home/jon/home.nix +++ b/home/jon/home.nix @@ -16,6 +16,8 @@ in ../../programs/neovim.nix ../../programs/firefox.nix ../../programs/newsboat.nix + + ../../programs/openvpn.nix ]; home.packages = with pkgs; [ @@ -23,6 +25,7 @@ in hunspell hunspellDicts.en_US + (pass.withExtensions (exts: [ exts.pass-otp ])) thefuck mpc-cli pavucontrol diff --git a/programs/openvpn.nix b/programs/openvpn.nix new file mode 100644 index 0000000..5f1c198 --- /dev/null +++ b/programs/openvpn.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: +{ + services.openvpn = { + servers = { + MulladVPN-US-Miami = { + config = builtins.readFile ../secrets/mullvad_us_mia/mullvad_us_mia.conf + }; + }; + }; +} diff --git a/systems/default.nix b/systems/default.nix index c10c94e..8248e36 100644 --- a/systems/default.nix +++ b/systems/default.nix @@ -140,7 +140,12 @@ audio_output { # List services that you want to enable: # Enable the OpenSSH daemon. - # services.openssh.enable = true; + services.openssh.enable = true; + + environment.shellInit = '' +gpg-connect-agent /bye +export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) + ''; # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; -- cgit v1.2.1