From 5a8f369e026be4b7f1ee5978562731229fd66070 Mon Sep 17 00:00:00 2001 From: cswimr Date: Mon, 18 Nov 2024 20:11:33 -0500 Subject: [PATCH] add `ktailctl` and reconfigure tailscale to have sensible defaults --- nixos/gui-pkgs.nix | 17 +++++++++++++++++ nixos/tailscale.nix | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/nixos/gui-pkgs.nix b/nixos/gui-pkgs.nix index 7a12b71..a508549 100644 --- a/nixos/gui-pkgs.nix +++ b/nixos/gui-pkgs.nix @@ -6,6 +6,7 @@ let onlyoffice-bin krita ytmdesktop + ktailctl wl-clipboard # we install xdg-desktop-portal-gtx so theming works from kde xdg-desktop-portal-gtk @@ -19,4 +20,20 @@ in { corefonts (nerdfonts.override { fonts = [ "FiraCode" ]; }) ]; + + # Systemd user services + # See https://wiki.nixos.org/wiki/Systemd/User_Services for more information + systemd.user.services = { + ktailctl = { + enable = true; + after = [ "network.target" ]; + wantedBy = [ "default.target" ]; + description = + "A GUI to monitor and manage Tailscale on your Linux desktop, built using KDE Frameworks and Kirigami2."; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.ktailctl}/bin/ktailctl"; + }; + }; + }; } diff --git a/nixos/tailscale.nix b/nixos/tailscale.nix index 93a6793..93256c7 100755 --- a/nixos/tailscale.nix +++ b/nixos/tailscale.nix @@ -5,6 +5,6 @@ # with the contents of your Tailscale auth key. # Make sure your permissions are set correctly, e.g. 0600. authKeyFile = "/run/secrets/tailscale"; - extraUpFlags = [ "--ssh" ]; + extraUpFlags = [ "--ssh" "--accept-routes" "--accept-dns" "--operator=cswimr" ]; }; }