diff --git a/modules/default.nix b/modules/default.nix index 841095e..7adcf2c 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -6,6 +6,7 @@ modulesCfg: {lib, ...}: { ./globalinstalls.nix ./server.nix ./sshd.nix + ./tailscale.nix ] ++ (map (path: (import path modulesCfg)) [ ./hardware diff --git a/modules/desktop/gnome-home.nix b/modules/desktop/gnome-home.nix index ded868b..86d2dab 100644 --- a/modules/desktop/gnome-home.nix +++ b/modules/desktop/gnome-home.nix @@ -63,6 +63,11 @@ in { }; }; } + (lib.mkIf config.my.tailscale.enable + { + home.packages = with pkgs.gnomeExtensions; [tailscale-qs]; + dconf.settings."org/gnome/shell".enabled-extensions = ["tailscale@joaophi.github.com"]; + }) ]; }; } diff --git a/modules/tailscale.nix b/modules/tailscale.nix new file mode 100644 index 0000000..b301dcb --- /dev/null +++ b/modules/tailscale.nix @@ -0,0 +1,19 @@ +{ + pkgs, + config, + lib, + ... +}: let + cfg = config.my.tailscale; +in { + options.my.tailscale = { + enable = lib.mkEnableOption "enable tailscale vpn"; + }; + + config = lib.mkIf cfg.enable { + services.tailscale = { + enable = true; + openFirewall = true; + }; + }; +} diff --git a/vinzenz-lpt.nix b/vinzenz-lpt.nix index 1bb1eda..1872c0a 100644 --- a/vinzenz-lpt.nix +++ b/vinzenz-lpt.nix @@ -9,6 +9,7 @@ config = { my = { enabledUsers = ["vinzenz"]; + tailscale.enable = true; desktop = { enableGnome = true; enableGaming = true;