From 8581cb4187530926fc01f9cd36a47387ea707177 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Tue, 19 Sep 2023 13:41:16 +0400 Subject: [PATCH] add wireguard --- config/xmonad/xmonad.hs | 1 - hosts/sakotop/configuration.nix | 1 + modules/desktop/default.nix | 2 ++ modules/desktop/wireguard/default.nix | 20 ++++++++++++++++++++ modules/desktop/wireguard/default.nix~ | 0 5 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 modules/desktop/wireguard/default.nix create mode 100644 modules/desktop/wireguard/default.nix~ diff --git a/config/xmonad/xmonad.hs b/config/xmonad/xmonad.hs index 86d46d03..cf7ff17d 100644 --- a/config/xmonad/xmonad.hs +++ b/config/xmonad/xmonad.hs @@ -307,7 +307,6 @@ myStartupHook = do spawnOnce "flameshot" spawn "picom" spawn "trayer --edge bottom --align right --iconspacing 5 --height 30 --widthtype request --alpha 0 --transparent true --tint 'black'" - ------------------------------------------------------------------------ -- Now run xmonad with all the defaults we set up. diff --git a/hosts/sakotop/configuration.nix b/hosts/sakotop/configuration.nix index 3facc66a..66586d38 100644 --- a/hosts/sakotop/configuration.nix +++ b/hosts/sakotop/configuration.nix @@ -18,6 +18,7 @@ modules = { desktop = { + wireguard.enable = true; kitty.enable = true; dwm.enable = false; xmonad.enable = true; diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 824dd4b6..2b5226e4 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -21,5 +21,7 @@ ./picom # boot ./plymouth + # vpn + ./wireguard ]; } diff --git a/modules/desktop/wireguard/default.nix b/modules/desktop/wireguard/default.nix new file mode 100644 index 00000000..af4b61b9 --- /dev/null +++ b/modules/desktop/wireguard/default.nix @@ -0,0 +1,20 @@ +{ + outputs, + options, + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.modules.desktop.wireguard; +in { + options.modules.desktop.wireguard = { + enable = mkEnableOption false; + }; + + config = mkIf cfg.enable { + # todo declaritivly setting it up + networking.wireguard.enable = true; + }; +} diff --git a/modules/desktop/wireguard/default.nix~ b/modules/desktop/wireguard/default.nix~ new file mode 100644 index 00000000..e69de29b