add let/in with aliases
This commit is contained in:
@@ -1,15 +1,19 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.modules.system.tailscale;
|
||||
authkey_file = "/run/secrets/tailscale_authkey";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.system.tailscale.enable = lib.mkEnableOption "enables tailscale";
|
||||
options.modules.system.tailscale = {
|
||||
enable = lib.mkEnableOption "enables tailscale";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.modules.system.tailscale.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
useRoutingFeatures = "both";
|
||||
authKeyFile = "/run/secrets/tailscale_authkey";
|
||||
authKeyFile = authkey_file;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user