feat: simple tailscale module to persist its directory

This commit is contained in:
Dmitriy Kholkin 2025-03-10 18:23:55 +03:00
parent 7c346eb6a8
commit 03df1ae699
Signed by: AtaraxiaDev
GPG Key ID: FD266B810DF48DF2
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,4 @@
{ ... }:
{
imports = [ ./tailscale.nix ];
}

View File

@ -0,0 +1,23 @@
{
config,
lib,
...
}:
let
inherit (lib) mkOption mkIf;
inherit (lib.types) bool;
cfg = config.ataraxia.vpn.tailscale;
in
{
options.ataraxia.vpn.tailscale = {
enable = mkOption {
type = bool;
default = config.services.tailscale.enable;
description = "Enable tailsacle";
};
};
config = mkIf cfg.enable {
persist.state.directories = [ "/var/lib/tailscale" ];
};
}