1
0

Compare commits

..

3 Commits

Author SHA1 Message Date
Flake Update Bot
f2bd8ef2a5 Update from updated-inputs-2024-11-24-02-03 2024-11-24 03:03:05 +01:00
Flake Update Bot
ec964956f3 Update nixpkgs 2024-11-24-02-03 2024-11-24 03:03:03 +01:00
6dc38cf21e hosts/carbon: Add net-printer 2024-11-23 23:00:19 +01:00
2 changed files with 48 additions and 0 deletions

View File

@ -14,6 +14,7 @@
./net-iot.nix
./net-lte.nix
./net-mgmt.nix
./net-printer.nix
./net-voip.nix
./ntp.nix
./ppp.nix

View File

@ -0,0 +1,47 @@
{ ... }:
{
networking.vlans."enp1s0.206" = {
id = 206;
interface = "enp1s0";
};
networking.bridges."net-printer".interfaces = [
"enp1s0.206"
];
networking.interfaces."net-printer".ipv4.addresses = [
{ address = "10.152.206.1"; prefixLength = 24; }
];
services.kea.dhcp4 = {
settings = {
interfaces-config = {
interfaces = [ "net-printer" ];
};
subnet4 = [
{
id = 206;
subnet = "10.152.206.0/24";
pools = [
{
pool = "10.152.206.100 - 10.152.206.240";
}
];
option-data = [
{
name = "routers";
data = "10.152.206.1";
}
];
}
];
};
};
clerie.firewall.extraForwardFilterCommands = ''
# Allow access from Heimnetz to printer
ip46tables -A forward-filter -i net-heimnetz -o net-printer -j ACCEPT
ip46tables -A forward-filter -i net-printer -j DROP
ip46tables -A forward-filter -o net-printer -j DROP
'';
}