From 5f32e4604e2bd1cb52c26a48cad7109295ddb31d Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Tue, 2 Jan 2024 17:52:56 -0800 Subject: [PATCH] set up protonvpn from emmanuelrosa's flake --- flake.lock | 86 ++++++++++++++++++++++++------ flake.nix | 6 +++ hosts/Alaska/modules/protonvpn.nix | 26 +++++++++ 3 files changed, 101 insertions(+), 17 deletions(-) create mode 100644 hosts/Alaska/modules/protonvpn.nix diff --git a/flake.lock b/flake.lock index 1f341ca..34bc843 100644 --- a/flake.lock +++ b/flake.lock @@ -1,8 +1,27 @@ { "nodes": { + "erosanix": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1704240213, + "narHash": "sha256-77L3ABF6aA94/1dEEABwgtWJ/q5PJ7U0DX6daFhOpOw=", + "owner": "emmanuelrosa", + "repo": "erosanix", + "rev": "9b42da22ad64502690e57fedadf3155150daafbd", + "type": "github" + }, + "original": { + "owner": "emmanuelrosa", + "repo": "erosanix", + "type": "github" + } + }, "ewwtilities": { "inputs": { - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "rust-overlay": "rust-overlay" }, "locked": { @@ -35,6 +54,22 @@ "type": "github" } }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -175,7 +210,7 @@ }, "kmonad": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "dir": "nix", @@ -195,7 +230,7 @@ }, "nicks_nextcloud_integrations": { "inputs": { - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "rust-overlay": "rust-overlay_2" }, "locked": { @@ -214,16 +249,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1699099776, - "narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=", + "lastModified": 1703894134, + "narHash": "sha256-hCRiCTTWuJs+lL78MNj0LoJlblRDdYDp4uCfgOb16R8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb", + "rev": "95e64993338571677c2af816112d57f5ac426dc1", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "master", "repo": "nixpkgs", "type": "github" } @@ -261,6 +296,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1699099776, + "narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1681358109, "narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=", @@ -276,7 +327,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1653326962, "narHash": "sha256-W8feCYqKTsMre4nAEpv5Kx1PVFC+hao/LwqtB2Wci/8=", @@ -292,7 +343,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1692447944, "narHash": "sha256-fkJGNjEmTPvqBs215EQU4r9ivecV5Qge5cF/QDLVn3U=", @@ -308,7 +359,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1681358109, "narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=", @@ -324,7 +375,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1703637592, "narHash": "sha256-8MXjxU0RfFfzl57Zy3OfXCITS0qWDNLzlBAdwxGZwfY=", @@ -340,7 +391,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_8": { "locked": { "lastModified": 1703637592, "narHash": "sha256-8MXjxU0RfFfzl57Zy3OfXCITS0qWDNLzlBAdwxGZwfY=", @@ -359,7 +410,7 @@ "nixvim": { "inputs": { "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_8", "pre-commit-hooks": "pre-commit-hooks" }, "locked": { @@ -378,7 +429,7 @@ }, "pre-commit-hooks": { "inputs": { - "flake-compat": "flake-compat", + "flake-compat": "flake-compat_2", "flake-utils": "flake-utils_4", "gitignore": "gitignore", "nixpkgs": [ @@ -403,12 +454,13 @@ }, "root": { "inputs": { + "erosanix": "erosanix", "ewwtilities": "ewwtilities", "headscale": "headscale", "home-manager": "home-manager", "kmonad": "kmonad", "nicks_nextcloud_integrations": "nicks_nextcloud_integrations", - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_7", "nixpkgs-stable": "nixpkgs-stable", "nixvim": "nixvim", "utils": "utils" @@ -417,7 +469,7 @@ "rust-overlay": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1699323235, @@ -436,7 +488,7 @@ "rust-overlay_2": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_6" }, "locked": { "lastModified": 1692497375, diff --git a/flake.nix b/flake.nix index 22916e3..f166dd1 100644 --- a/flake.nix +++ b/flake.nix @@ -22,6 +22,10 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + erosanix = { + url = "github:emmanuelrosa/erosanix"; + }; + nicks_nextcloud_integrations.url = "git+https://git.nickiel.net/Nickiel/nicks_nextcloud_integrations.git"; ewwtilities.url = "git+https://git.nickiel.net/Nickiel/Ewwtilities.git"; @@ -65,6 +69,7 @@ { networking.hostName = "Alaska"; } + inputs.erosanix.nixosModules.protonvpn inputs.nicks_nextcloud_integrations.nixosModules.default ./hosts/Alaska home-manager.nixosModules.home-manager { @@ -127,6 +132,7 @@ { networking.hostName = "NicksNixDesktop"; } + inputs.erosanix.nixosModules.protonvpn kmonad.nixosModules.default ./hosts/desktop ./hosts/configuration.nix diff --git a/hosts/Alaska/modules/protonvpn.nix b/hosts/Alaska/modules/protonvpn.nix new file mode 100644 index 0000000..54a378f --- /dev/null +++ b/hosts/Alaska/modules/protonvpn.nix @@ -0,0 +1,26 @@ +{ config, ...}: + +let +in +{ + services.protonvpn = { + enable = true; + autostart = false; + interface = { + name = "protonvpn"; + ip = "10.2.0.2/32"; + port = 51820; + privateKeyFile = "/home/nixolas/.passfiles/protonvpn"; + dns = { + enable = true; + ip = "10.2.0.1"; + }; + }; + endpoint = { + publicKey = "yB6ySO0kjqbgVWanDYKDgWoAMwM3X//nBiKXwaqmiwU="; + ip = "89.187.180.55"; + port = 51820; + }; + }; + +}