mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-10 04:49:19 -08:00
modules: add hexchen's network thing
This commit is contained in:
parent
e0aa1fc238
commit
017372b348
4 changed files with 57 additions and 2 deletions
5
hosts/dummy/home/default.nix
Normal file
5
hosts/dummy/home/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
}
|
||||
36
hosts/dummy/nixos/default.nix
Normal file
36
hosts/dummy/nixos/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ config, lib, pkgs, sources, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
hexchen = (import sources.nix-hexchen) {};
|
||||
hexYgg = filterAttrs (_: c: c.enable) (
|
||||
mapAttrs (_: host: host.config.hexchen.network) hexchen.hosts
|
||||
);
|
||||
in {
|
||||
# stuff so dummy host is buildable (you probably don't want/need this???)
|
||||
# but idk your config sooooo
|
||||
boot.isContainer = true;
|
||||
networking.useDHCP = false;
|
||||
users.users.root.hashedPassword = "";
|
||||
|
||||
hexchen.network = {
|
||||
enable = true;
|
||||
pubkey = "0000000000000000000000000000000000000000000000000000000000000000";
|
||||
listen.enable = true;
|
||||
listen.endpoints = flatten (map (c: c.listen.endpoints) (filter (c: c.listen.enable) (attrValues hexYgg)));
|
||||
extra.pubkeys = {
|
||||
} // (mapAttrs (_: c: c.pubkey) hexYgg);
|
||||
};
|
||||
|
||||
# snippet for single host
|
||||
# hexchen.network = {
|
||||
# enable = true;
|
||||
# pubkey = "0000000000000000000000000000000000000000000000000000000000000000";
|
||||
# # if server, enable this and set endpoint:
|
||||
# listen.enable = false;
|
||||
# listen.endpoints = [
|
||||
# "tcp://0.0.0.0:0"
|
||||
# ];
|
||||
# };
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue