mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
chore: nf-fmt-nix
This commit is contained in:
parent
c2089adbc7
commit
5cbde2e43f
4 changed files with 33 additions and 24 deletions
|
|
@ -26,14 +26,16 @@
|
||||||
];
|
];
|
||||||
mapDynamic4 = replaceStrings ["10.1.1."] ["0.0.0."];
|
mapDynamic4 = replaceStrings ["10.1.1."] ["0.0.0."];
|
||||||
mapDynamic6 = replaceStrings ["fd0a::"] ["2001::"];
|
mapDynamic6 = replaceStrings ["fd0a::"] ["2001::"];
|
||||||
mkDynamicHostRecords = system: map (mkDynamicHostRecord system) (
|
mkDynamicHostRecords = system:
|
||||||
|
map (mkDynamicHostRecord system) (
|
||||||
singleton system.access.fqdn
|
singleton system.access.fqdn
|
||||||
++ system.access.fqdnAliases
|
++ system.access.fqdnAliases
|
||||||
);
|
);
|
||||||
mkDynamicHostRecord = system: let
|
mkDynamicHostRecord = system: let
|
||||||
address4 = system.network.networks.local.address4 or null;
|
address4 = system.network.networks.local.address4 or null;
|
||||||
address6 = system.network.networks.local.address6 or null;
|
address6 = system.network.networks.local.address6 or null;
|
||||||
in fqdn:
|
in
|
||||||
|
fqdn:
|
||||||
concatStringsSep "," (
|
concatStringsSep "," (
|
||||||
singleton fqdn
|
singleton fqdn
|
||||||
++ optional (address4 != null)
|
++ optional (address4 != null)
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,9 @@ _: {
|
||||||
modules = [
|
modules = [
|
||||||
./nixos.nix
|
./nixos.nix
|
||||||
];
|
];
|
||||||
deploy = {
|
deploy = {
|
||||||
hostname = "10.1.1.50";
|
hostname = "10.1.1.50";
|
||||||
};
|
};
|
||||||
network.networks = {
|
network.networks = {
|
||||||
tail = {
|
tail = {
|
||||||
#address4 = "100.70.124.79";
|
#address4 = "100.70.124.79";
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
{ config, meta, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
meta,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = let
|
imports = let
|
||||||
inherit (meta) nixos;
|
inherit (meta) nixos;
|
||||||
in [
|
in [
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
{config, lib, ...}: let
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
inherit (lib.strings) concatStringsSep;
|
inherit (lib.strings) concatStringsSep;
|
||||||
dot = concatStringsSep ".";
|
dot = concatStringsSep ".";
|
||||||
cutie = dot ["cutie" "moe"];
|
cutie = dot ["cutie" "moe"];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue