macvlan
This commit is contained in:
1 parent
b014fa5cea
commit
7cd2b2ca20
3 files changed
+42
-8
No files matched your search
Generated
+4
-4
@@ -831,11 +831,11 @@
|
|||||||
"nixpkgs": "nixpkgs_7"
|
"nixpkgs": "nixpkgs_7"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1789499413,
|
"lastModified": 1789573245,
|
||||||
"narHash": "sha256-RyMbCILS77BUTZqT1/ST3cVUsflfnp/7rm6S25MG4jA=",
|
"narHash": "sha256-Uw1DJF/XubQrnzjPftoE6yBGIYKQ1UjMYpG6k2ye6VA=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "41ea93a28fc3b2a80231330c5f6d57f5f988af6b",
|
"rev": "e5f150b17e3ac19b3082246734741885fb141a2d",
|
||||||
"revCount": 7,
|
"revCount": 18,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://gitea@minipc1.lab.internal:22/ari/hermenix.git"
|
"url": "ssh://gitea@minipc1.lab.internal:22/ari/hermenix.git"
|
||||||
},
|
},
|
||||||
|
|||||||
+28
-3
@@ -1,4 +1,23 @@
|
|||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }:
|
||||||
|
let
|
||||||
|
macvlanNetwork = {
|
||||||
|
lan = {
|
||||||
|
driver = "macvlan";
|
||||||
|
driver_opts = {
|
||||||
|
parent = "enp2s0";
|
||||||
|
};
|
||||||
|
ipam = {
|
||||||
|
config = [
|
||||||
|
{
|
||||||
|
subnet = "10.0.0.0/16";
|
||||||
|
gateway = "10.0.0.1";
|
||||||
|
ip_range = "10.0.101.240/28";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
skyg.user.enable = true;
|
skyg.user.enable = true;
|
||||||
skyg.nixos.common.ssh-server.enable = true;
|
skyg.nixos.common.ssh-server.enable = true;
|
||||||
@@ -54,10 +73,16 @@
|
|||||||
autoUpdate.enable = true;
|
autoUpdate.enable = true;
|
||||||
services.drawdb = {
|
services.drawdb = {
|
||||||
image = "ghcr.io/drawdb-io/drawdb:latest";
|
image = "ghcr.io/drawdb-io/drawdb:latest";
|
||||||
ports = [
|
environment = {
|
||||||
"3000:80"
|
PORT = "80";
|
||||||
];
|
};
|
||||||
|
networks = {
|
||||||
|
lan = {
|
||||||
|
ipv4_address = "10.0.101.2";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
networks = macvlanNetwork;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Portainer Service
|
# Portainer Service
|
||||||
|
|||||||
@@ -139,11 +139,20 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
networks = lib.mkOption {
|
networks = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.either (lib.types.listOf lib.types.str) (lib.types.attrsOf lib.types.anything);
|
||||||
default = [ ];
|
default = [ ];
|
||||||
|
example = {
|
||||||
|
lan = { ipv4_address = "10.0.101.1"; };
|
||||||
|
};
|
||||||
description = ''
|
description = ''
|
||||||
Networks to join. Empty list = attach to the group's
|
Networks to join. Empty list = attach to the group's
|
||||||
auto-created bridge network (named after the group).
|
auto-created bridge network (named after the group).
|
||||||
|
|
||||||
|
Accepts either a plain list of network names, or an attrset
|
||||||
|
mapping network name -> per-network attrs (e.g.
|
||||||
|
ipv4_address, aliases) for compose's mapping form of the
|
||||||
|
networks: key -- needed to assign a static IP on a
|
||||||
|
macvlan/custom network.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user