mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
refactor: move kanidm to tei
This commit is contained in:
parent
b9e1f544f7
commit
b892e420ab
7 changed files with 80 additions and 28 deletions
24
modules/nixos/access.nix
Normal file
24
modules/nixos/access.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (config.networking) hostName;
|
||||
in {
|
||||
options.networking.access = with lib.types; {
|
||||
hostnameForNetwork = mkOption {
|
||||
type = attrsOf str;
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
|
||||
config.networking.access = {
|
||||
hostnameForNetwork = {
|
||||
local = mkIf config.services.avahi.enable "${hostName}.local";
|
||||
tail = mkIf config.services.tailscale.enable "${hostName}.tail.cutie.moe";
|
||||
global = mkIf config.networking.enableIPv6 "${hostName}.cutie.moe";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue