add tailscale

This commit is contained in:
Vinzenz Schroeter 2023-12-04 22:24:43 +01:00
parent e85ece0859
commit d790d3ba3e
4 changed files with 26 additions and 0 deletions

View file

@ -6,6 +6,7 @@ modulesCfg: {lib, ...}: {
./globalinstalls.nix ./globalinstalls.nix
./server.nix ./server.nix
./sshd.nix ./sshd.nix
./tailscale.nix
] ]
++ (map (path: (import path modulesCfg)) [ ++ (map (path: (import path modulesCfg)) [
./hardware ./hardware

View file

@ -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"];
})
]; ];
}; };
} }

19
modules/tailscale.nix Normal file
View file

@ -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;
};
};
}

View file

@ -9,6 +9,7 @@
config = { config = {
my = { my = {
enabledUsers = ["vinzenz"]; enabledUsers = ["vinzenz"];
tailscale.enable = true;
desktop = { desktop = {
enableGnome = true; enableGnome = true;
enableGaming = true; enableGaming = true;