From 73ece504c9aebeb0fbcd561f89fdb39604629b68 Mon Sep 17 00:00:00 2001 From: lsoriano-mcm Date: Sat, 7 Jun 2025 08:11:17 -0500 Subject: [PATCH] organized better --- info.default.nix | 6 ++++-- modules/system.nix | 4 ++-- system/vpn.nix | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/info.default.nix b/info.default.nix index 1d5ce07..8bf0dfa 100644 --- a/info.default.nix +++ b/info.default.nix @@ -3,8 +3,10 @@ username = "biscuit"; timezone = "America/Chicago"; - vpnEnable = true; - vpnSecretFile = "/home/biscuit/Wireguard/secret"; + vpn = { + vpnEnable = true; + vpnSecretFile = "/home/biscuit/Wireguard/secret"; + }; allowUnfree = true; touchpadSupport = false; diff --git a/modules/system.nix b/modules/system.nix index d7e1cd4..f99923a 100644 --- a/modules/system.nix +++ b/modules/system.nix @@ -1,5 +1,5 @@ { - vpnEnable, + vpn, lib, ... }: { @@ -8,7 +8,7 @@ ../system/default.nix ../system/users.nix ] - ++ lib.optionals (vpnEnable == true) [ + ++ lib.optionals (vpn.vpnEnable == true) [ ../system/vpn.nix ]; } diff --git a/system/vpn.nix b/system/vpn.nix index 7957085..19d61c8 100644 --- a/system/vpn.nix +++ b/system/vpn.nix @@ -1,5 +1,5 @@ { - vpnSecretFile, + vpn, username, ... }: { @@ -8,7 +8,7 @@ address = ["10.2.0.2/32"]; # listenPort = 51820; # FIXME change privateKey to variable and add env (make sure it is inaccessible!) - privateKeyFile = vpnSecretFile; + privateKeyFile = vpn.vpnSecretFile; dns = ["10.2.0.1"]; peers = [ {