chore: make builder hostname more accessible
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
let
|
let
|
||||||
builderHosts = lib.filterAttrs (_n: v: (builtins.hasAttr "builder" v) && v.builder) metadata.hosts;
|
builderHosts = lib.filterAttrs (_n: v: (builtins.hasAttr "builder" v) && v.builder) metadata.hosts;
|
||||||
cfg = config.greg.nix;
|
cfg = config.greg.nix;
|
||||||
|
hostname = x: if cfg.cache then "${x}.shire-zebra.ts.net" else "${x}.thehellings.lan";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.greg.nix = {
|
options.greg.nix = {
|
||||||
@@ -22,7 +23,7 @@ in
|
|||||||
programs.ssh.extraConfig = builtins.concatStringsSep "\n" (
|
programs.ssh.extraConfig = builtins.concatStringsSep "\n" (
|
||||||
lib.map (x: ''
|
lib.map (x: ''
|
||||||
Host ${x}-builder
|
Host ${x}-builder
|
||||||
Hostname ${x}.shire-zebra.ts.net
|
Hostname ${hostname x}
|
||||||
User remote-builder-user
|
User remote-builder-user
|
||||||
'') (lib.attrNames builderHosts)
|
'') (lib.attrNames builderHosts)
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user