tailscale
This commit is contained in:
parent
b9a33662c3
commit
bf8c3116e8
1 changed files with 37 additions and 0 deletions
37
desktop/tailscale.nix
Normal file
37
desktop/tailscale.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
{
|
||||||
|
description = "NixOS with Tailscale + Plasma tray";
|
||||||
|
|
||||||
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs }:
|
||||||
|
let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
in {
|
||||||
|
nixosConfigurations.my-host = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
({ pkgs, ... }: {
|
||||||
|
networking.hostName = "my-host";
|
||||||
|
|
||||||
|
services.tailscale = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
extraUpFlags = [ "--ssh" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.tail-tray ];
|
||||||
|
|
||||||
|
systemd.user.services.tail-tray = {
|
||||||
|
description = "Tailscale tray (Plasma)";
|
||||||
|
wantedBy = [ "graphical-session.target" ];
|
||||||
|
after = [ "graphical-session.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${pkgs.tail-tray}/bin/tail-tray";
|
||||||
|
Restart = "on-failure";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue