update for auth h002
This commit is contained in:
parent
c781a90851
commit
2b026ed0c8
2 changed files with 5 additions and 8 deletions
|
@ -17,18 +17,12 @@ in
|
|||
options =
|
||||
{ }
|
||||
// lib.attrsets.setAttrByPath cfg_path {
|
||||
enable = lib.mkEnableOption "rust development tools";
|
||||
useSecretsAuth = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Whether to use secrets authentication for Tailscale";
|
||||
};
|
||||
enable = lib.mkEnableOption "enable tailnet";
|
||||
useHeadscale = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Whether to use headscale login server.";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -37,7 +31,9 @@ in
|
|||
enable = true;
|
||||
openFirewall = true;
|
||||
useRoutingFeatures = "client";
|
||||
authKeyFile = lib.mkIf cfg.useSecretsAuth config.age.secrets.headscale_auth.path;
|
||||
authKeyFile = lib.mkIf (
|
||||
config ? age && config.age ? secrets && config.age.secrets ? headscale_auth
|
||||
) config.age.secrets.headscale_auth.path;
|
||||
# https://tailscale.com/kb/1241/tailscale-up
|
||||
extraUpFlags = lib.mkIf cfg.useHeadscale [
|
||||
"--login-server=https://headscale.joshuabell.xyz"
|
||||
|
|
|
@ -75,6 +75,7 @@
|
|||
users = {
|
||||
josh = {
|
||||
imports = with common.homeManagerModules; [
|
||||
kitty
|
||||
tmux
|
||||
atuin
|
||||
direnv
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue