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 =
|
options =
|
||||||
{ }
|
{ }
|
||||||
// lib.attrsets.setAttrByPath cfg_path {
|
// lib.attrsets.setAttrByPath cfg_path {
|
||||||
enable = lib.mkEnableOption "rust development tools";
|
enable = lib.mkEnableOption "enable tailnet";
|
||||||
useSecretsAuth = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = true;
|
|
||||||
description = "Whether to use secrets authentication for Tailscale";
|
|
||||||
};
|
|
||||||
useHeadscale = lib.mkOption {
|
useHeadscale = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "Whether to use headscale login server.";
|
description = "Whether to use headscale login server.";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
@ -37,7 +31,9 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
useRoutingFeatures = "client";
|
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
|
# https://tailscale.com/kb/1241/tailscale-up
|
||||||
extraUpFlags = lib.mkIf cfg.useHeadscale [
|
extraUpFlags = lib.mkIf cfg.useHeadscale [
|
||||||
"--login-server=https://headscale.joshuabell.xyz"
|
"--login-server=https://headscale.joshuabell.xyz"
|
||||||
|
|
|
@ -75,6 +75,7 @@
|
||||||
users = {
|
users = {
|
||||||
josh = {
|
josh = {
|
||||||
imports = with common.homeManagerModules; [
|
imports = with common.homeManagerModules; [
|
||||||
|
kitty
|
||||||
tmux
|
tmux
|
||||||
atuin
|
atuin
|
||||||
direnv
|
direnv
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue