From 41f182ca22fb322bca21c8f444c508fc8f6eedc7 Mon Sep 17 00:00:00 2001 From: muon Date: Mon, 17 Jun 2024 13:36:02 +0000 Subject: [PATCH] Add tailscale and openvpn --- hosts/muon/configuration.nix | 2 ++ modules/home/desktop/productivity.nix | 5 ++++- modules/home/terminal/tools.nix | 12 +++++++++++- modules/nixos/core/network.nix | 22 ++++++++++++++++++++-- 4 files changed, 37 insertions(+), 4 deletions(-) diff --git a/hosts/muon/configuration.nix b/hosts/muon/configuration.nix index fd22070..913077b 100644 --- a/hosts/muon/configuration.nix +++ b/hosts/muon/configuration.nix @@ -28,7 +28,9 @@ in { mods.desktop.enable = true; mods.desktop.wayland.enable = false; mods.theme.enable = true; + mods.theme.scheme = "woodland"; mods.theme.wallpaper = ./wallpaper.png; + mods.openvpn.enable = true; services.xserver.windowManager.i3.enable = true; diff --git a/modules/home/desktop/productivity.nix b/modules/home/desktop/productivity.nix index 92c2b2f..21b402e 100644 --- a/modules/home/desktop/productivity.nix +++ b/modules/home/desktop/productivity.nix @@ -6,6 +6,10 @@ home.packages = with pkgs; [ # ISO downloader qbittorrent + transmission-gtk + + # email + thunderbird ]; home.sessionVariables.BROWSER = "librewolf"; @@ -21,6 +25,5 @@ "network.cookie.lifetimePolicy" = 0; }; }; - }; } diff --git a/modules/home/terminal/tools.nix b/modules/home/terminal/tools.nix index 48b8d46..745b577 100644 --- a/modules/home/terminal/tools.nix +++ b/modules/home/terminal/tools.nix @@ -10,6 +10,11 @@ in with lib; { # enableZshIntegration = mkIf cfg.zsh.enable true; }; + programs.fzf = { + enable = true; + enableZshIntegration = mkIf cfg.zsh.enable true; + }; + programs.zoxide = { enable = true; enableZshIntegration = mkIf cfg.zsh.enable true; @@ -20,14 +25,19 @@ in with lib; { enableZshIntegration = mkIf cfg.zsh.enable true; }; + programs.yazi = { + enable = true; + enableZshIntegration = mkIf cfg.zsh.enable true; + }; + home.packages = with pkgs; [ # libraries glow + ueberzugpp # file managing fd ripgrep - zoxide trash-cli # programs diff --git a/modules/nixos/core/network.nix b/modules/nixos/core/network.nix index d890b0b..60ca0af 100644 --- a/modules/nixos/core/network.nix +++ b/modules/nixos/core/network.nix @@ -1,3 +1,21 @@ -{ pkgs, lib, ... }: { - networking.networkmanager.enable = true; +{ pkgs, lib, config, ... }: { + options.mods = { + openvpn.enable = lib.mkEnableOption "enables openvpn config"; + openvpn.config = let + username = "${config.mods.user.name}"; + folder = "${config.users.users.${username}.home}/documents/openvpn/"; + file = "${config.mods.user.name}.ovpn"; + in lib.mkOption { + description = "the config location"; + default = "${folder}${file}"; + }; + }; + + config = { + networking.networkmanager.enable = true; + services.tailscale.enable = true; + services.openvpn.servers = lib.mkIf config.mods.openvpn.enable { + remote.config = ''config ${config.mods.openvpn.config}''; + }; + }; }