initial commit
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.network = {
|
||||
nodes = lib.mkOption { type = lib.types.attrsOf
|
||||
(lib.types.submodule ({ name, config, ... }: {
|
||||
options = {
|
||||
id = lib.mkOption { type = lib.types.int; };
|
||||
ssh = lib.mkOption { type = lib.types.str; };
|
||||
vpn = lib.mkOption { type = lib.types.str; };
|
||||
address-vpn = lib.mkOption { type = lib.types.str; };
|
||||
address-pub = lib.mkOption { type = lib.types.nullOr lib.types.str; default = null; };
|
||||
};
|
||||
config = {
|
||||
address-vpn = "10.0.0.${toString config.id}";
|
||||
};
|
||||
}));
|
||||
};
|
||||
node = lib.mkOption { type = lib.types.str; };
|
||||
};
|
||||
config.network = {
|
||||
nodes = {
|
||||
laptop = {
|
||||
id = 1;
|
||||
ssh = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKhCH6YN63AWFsR1wZ6wJdZ2jlTtYBSkY5FnLrWoLKeg";
|
||||
vpn = "n+9eh8VUP9NCnjPL0Z/KPc0TQCQloXE2Ipc5+CBtJjU=";
|
||||
};
|
||||
desktop = {
|
||||
id = 2;
|
||||
ssh = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFdOUv+mUhnS2sbahlqcqm9Ili16/rOk2WAlMSXrjnHu";
|
||||
vpn = "7BcwtszpzS4ABDwKwMaiJ7F35sJRa89fBbuh80Sk8Uk=";
|
||||
};
|
||||
vps = {
|
||||
id = 3;
|
||||
ssh = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGiiLFiy+UcOi0RgZ1Xvuzl4C5aiZ+bcGaOmQcI/UBXp";
|
||||
vpn = "c5irm217aE+QVwHYmnQh4r91u2fZmQKBIWVgFVMaEwU=";
|
||||
address-pub = "216.128.177.13";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user