installed tailscale on all machines

This commit is contained in:
Leyla Becker 2025-02-23 11:10:16 -06:00
parent 9bfa5c9e8d
commit 2e0f71a6fa
7 changed files with 133 additions and 62 deletions

View file

@ -0,0 +1,34 @@
{
config,
lib,
...
}: let
tailscale_data_directory = "/var/lib/tailscale";
in {
options.host.tailscale = {
enable = lib.mkEnableOption "should tailscale be enabled on this computer";
};
config = lib.mkIf config.services.tailscale.enable (
lib.mkMerge [
{
# any configs we want shared between all machines
}
(lib.mkIf config.host.impermanence.enable {
environment.persistence = {
"/persist/system/root" = {
enable = true;
hideMounts = true;
directories = [
{
directory = tailscale_data_directory;
user = "jellyfin";
group = "jellyfin";
}
];
};
};
})
]
);
}