add voyager

This commit is contained in:
2026-07-06 22:24:28 +02:00
parent 925eb72c53
commit f87ba26c5e
9 changed files with 65 additions and 26 deletions
+7 -7
View File
@@ -2,12 +2,12 @@ _:
{
boot = {
loader = {
systemd-boot = {
enable = true;
};
efi = {
canTouchEfiVariables = true;
};
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
kernel.sysctl = {
"net.ipv4.ip_forward" = 1;
"net.ipv6.conf.all.forwarding" = 1;
};
};
}
+2 -3
View File
@@ -1,13 +1,12 @@
{ config, pkgs, ... }:
{
imports = [
#./dhcp.nix
#./nat.nix
#./firewall.nix
./users.nix
./networking.nix
./time.nix
./system.nix
./boot.nix
./dnsmasq.nix
./ssh.nix
];
}
View File
+19
View File
@@ -0,0 +1,19 @@
_:
{
services.dnsmasq = {
enable = true;
settings = {
dhcp-range = [ "10.11.1.100,10.11.1.200,12h" ];
interface = "enp4s0";
server = [ "10.11.0.10" ];
no-hosts = true;
dhcp-option = [
"option:router,10.11.0.1"
"option:dns-server,10.11.0.10"
];
};
};
}
View File
View File
+25 -13
View File
@@ -2,20 +2,32 @@ _:
{
networking = {
hostName = "voyager";
networkmanager = { enable = true; };
firewall = { enable = false; };
interfaces = {
eno1 = {
ipv4.addresses = [{
address = "10.11.0.10";
prefixLength = 24;
}];
};
networkmanager.enable = false;
useDHCP = false;
interfaces.enp3s0 = {
useDHCP = true; # WAN DHCP
};
defaultGateway = {
address = "10.11.0.1";
interface = "eno1";
interfaces.enp4s0 = {
ipv4.addresses = [{
address = "10.11.0.1";
prefixLength = 24;
}];
};
nat = {
enable = true;
externalInterface = "enp3s0"; # WAN
internalInterfaces = [ "enp4s0" ]; # LAN
};
firewall = {
enable = true;
extraCommands = ''
iptables -A nixos-fw -p tcp --dport 22 -s 10.11.0.0/24 -j ACCEPT
'';
};
};
}
+8
View File
@@ -0,0 +1,8 @@
_:
{
services = {
openssh = {
enable = true;
};
};
}