26 lines
493 B
Nix
26 lines
493 B
Nix
{...}: {
|
|||
|
|
flake.modules.nixos.tailscale = {
|
||
|
|
lib,
|
||
|
|
config,
|
||
|
|
...
|
||
|
|
}:
|
||
|
|
with lib; let
|
||
|
|
cfg = config.mySystem.network.tailscale;
|
||
|
|
in {
|
||
|
|
options.mySystem.network.tailscale = {
|
||
|
|
enable = mkOption {
|
||
|
|
type = types.bool;
|
||
|
|
default = true;
|
||
|
|
};
|
||
|
|
};
|
||
|
|
config.services.tailscale = {
|
||
|
|
inherit (cfg) enable;
|
||
|
|
extraSetFlags = [
|
||
|
|
"--accept-dns"
|
||
|
|
"--accept-routes"
|
||
|
|
"--ssh"
|
||
|
|
];
|
||
|
|
};
|
||
|
|
};
|
||
|
|
}
|