mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 05:48:12 +09:00
fix
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
./tailscale.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.my.features.network.tailscale;
|
||||
in
|
||||
{
|
||||
options.my.features.network.tailscale = {
|
||||
enable = lib.mkEnableOption "Tailscale VPN";
|
||||
acceptDns = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Accept DNS configuration from Tailscale";
|
||||
};
|
||||
acceptRoutes = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Accept subnet routes from Tailscale";
|
||||
};
|
||||
extraUpFlags = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
description = "Additional flags to pass to tailscale up";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.applications.tailscale = {
|
||||
enable = true;
|
||||
inherit (cfg) acceptDns acceptRoutes extraUpFlags;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user