mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 20:39:18 -08:00
feat(tf): tailscale
This commit is contained in:
parent
ff688fb97a
commit
a618279fed
10 changed files with 111 additions and 22 deletions
|
|
@ -4,7 +4,11 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.modules) mkIf mkDefault;
|
||||
inherit (lib.strings) optionalString;
|
||||
inherit (lib.meta) getExe;
|
||||
cfg = config.services.tailscale;
|
||||
in {
|
||||
options.services.tailscale = with types; {
|
||||
|
|
@ -27,7 +31,9 @@ in {
|
|||
|
||||
services.tailscale.enable = mkDefault true;
|
||||
|
||||
sops.secrets.tailscale-key = mkIf cfg.enable {};
|
||||
sops.secrets.tailscale-key = mkIf cfg.enable {
|
||||
sopsFile = mkDefault ./secrets/tailscale.yaml;
|
||||
};
|
||||
systemd.services.tailscale-autoconnect = mkIf cfg.enable rec {
|
||||
description = "Automatic connection to Tailscale";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue