1
0

Update from updated-inputs-2025-03-20-02-03

This commit is contained in:
Flake Update Bot 2025-03-20 03:04:08 +01:00
commit 8b4d68626a
9 changed files with 82 additions and 164 deletions

6
flake.lock generated

@ -533,11 +533,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1742069588, "lastModified": 1742288794,
"narHash": "sha256-C7jVfohcGzdZRF6DO+ybyG/sqpo1h6bZi9T56sxLy+k=", "narHash": "sha256-Txwa5uO+qpQXrNG4eumPSD+hHzzYi/CdaM80M9XRLCo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c80f6a7e10b39afcc1894e02ef785b1ad0b0d7e5", "rev": "b6eaf97c6960d97350c584de1b6dcff03c9daf42",
"type": "github" "type": "github"
}, },
"original": { "original": {

@ -4,34 +4,29 @@
imports = imports =
[ [
./hardware-configuration.nix ./hardware-configuration.nix
./ppp.nix
./programs.nix
./users.nix
]; ];
profiles.clerie.network-fallback-dhcp.enable = true;
boot.kernelParams = [ "console=ttyS0,115200n8" ]; boot.kernelParams = [ "console=ttyS0,115200n8" ];
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
# boot.loader.grub.efiSupport = true; boot.loader.grub.device = "/dev/sda";
# boot.loader.grub.efiInstallAsRemovable = true;
# boot.loader.efi.efiSysMountPoint = "/boot/efi";
# Define on which hard drive you want to install Grub.
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
boot.loader.grub.extraConfig = " boot.loader.grub.extraConfig = "
serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1 serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1
terminal_input serial terminal_input serial
terminal_output serial terminal_output serial
"; ";
#networking.firewall.enable = false; networking.useDHCP = false;
services.wg-clerie = { systemd.network.enable = true;
enable = true;
ipv6s = [ "2a01:4f8:c0c:15f1::8108/128" ]; #services.wg-clerie = {
ipv4s = [ "10.20.30.108/32" ]; # enable = true;
}; # ipv6s = [ "2a01:4f8:c0c:15f1::8108/128" ];
# ipv4s = [ "10.20.30.108/32" ];
#};
clerie.monitoring = { clerie.monitoring = {
enable = true; enable = true;

@ -1,90 +0,0 @@
{ pkgs, ... }:
{
# Make space for VLAN header in containing ethernet segment
networking.interfaces."enp1s0".mtu = 1518;
## DSL-Uplink
networking.vlans."enp1s0.7" = {
id = 7;
interface = "enp1s0";
};
services.pppd = {
enable = true;
peers.lns-test = {
config = ''
plugin pppoe.so enp1s0.7
user "criese#regiotest@bsa-vdsl"
ifname ppp-lns-test
persist
maxfail 0
holdoff 5
noipdefault
lcp-echo-interval 20
lcp-echo-failure 3
hide-password
nodefaultroute
+ipv6
debug
'';
};
};
/*
networking.interfaces.lo.useDHCP = true;
networking.interfaces.ppp-lns-test.useDHCP = true;
networking.dhcpcd = {
enable = true;
extraConfig = ''
interface ppp-lns-test
ipv6rs
ia_pd 0 lo/0
'';
};*/
environment.etc."ppp/ip-up" = {
text = ''
#! ${pkgs.runtimeShell} -e
${pkgs.iproute2}/bin/ip route flush table 20001 || true
${pkgs.iproute2}/bin/ip route add default dev ppp-lns-test table 20001
'';
mode = "555";
};
environment.etc."ppp/ip-down" = {
text = ''
#! ${pkgs.runtimeShell} -e
${pkgs.iproute2}/bin/ip route flush table 20001 || true
'';
mode = "555";
};
environment.etc."ppp/ipv6-up" = {
text = ''
#! ${pkgs.runtimeShell} -e
${pkgs.iproute2}/bin/ip -6 route flush table 20001 || true
${pkgs.iproute2}/bin/ip -6 route add default dev ppp-lns-test table 20001
'';
mode = "555";
};
environment.etc."ppp/ipv6-down" = {
text = ''
#! ${pkgs.runtimeShell} -e
${pkgs.iproute2}/bin/ip -6 route flush table 20001 || true
'';
mode = "555";
};
petabyte.policyrouting = {
enable = true;
rules4 = [
{ rule = "from 212.218.16.237/32 lookup 20001"; prio = 19000; }
{ rule = "from 212.218.16.237/32 unreachable"; prio = 19001; }
];
};
}

@ -1,9 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
tcpdump # for remote wireshark
];
}

@ -1,10 +0,0 @@
{ ... }:
{
users.users.criese-nethinks = {
extraGroups = [
"wheel"
];
};
}

@ -6,6 +6,8 @@
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
profiles.clerie.network-fallback-dhcp.enable = true;
boot.kernelParams = [ "console=ttyS0,115200n8" ]; boot.kernelParams = [ "console=ttyS0,115200n8" ];
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
@ -18,42 +20,45 @@
networking.hostName = "beryllium"; networking.hostName = "beryllium";
networking.useDHCP = false;
systemd.network.enable = true;
networking.firewall.enable = false; networking.firewall.enable = false;
networking.iproute2.enable = true; #networking.iproute2.enable = true;
networking.iproute2.rttablesExtraConfig = '' #networking.iproute2.rttablesExtraConfig = ''
200 wg-clerie # 200 wg-clerie
''; #'';
petabyte.policyrouting = { #petabyte.policyrouting = {
enable = true; # enable = true;
rules6 = [ # rules6 = [
{ rule = "from 2a01:4f8:c0c:15f1::8107/128 lookup wg-clerie"; prio = 20000; } # { rule = "from 2a01:4f8:c0c:15f1::8107/128 lookup wg-clerie"; prio = 20000; }
{ rule = "from 2a01:4f8:c0c:15f1::8107/128 unreachable"; prio = 20001; } # { rule = "from 2a01:4f8:c0c:15f1::8107/128 unreachable"; prio = 20001; }
]; # ];
rules4 = [ # rules4 = [
{ rule = "from 10.20.30.107/32 lookup wg-clerie"; prio = 20000; } # { rule = "from 10.20.30.107/32 lookup wg-clerie"; prio = 20000; }
{ rule = "from 10.20.30.107/32 unreachable"; prio = 20001; } # { rule = "from 10.20.30.107/32 unreachable"; prio = 20001; }
]; # ];
}; #};
networking.wireguard.enable = true; #networking.wireguard.enable = true;
networking.wireguard.interfaces = { #networking.wireguard.interfaces = {
wg-clerie = { # wg-clerie = {
ips = [ "2a01:4f8:c0c:15f1::8107/128" "10.20.30.107/32" ]; # ips = [ "2a01:4f8:c0c:15f1::8107/128" "10.20.30.107/32" ];
table = "wg-clerie"; # table = "wg-clerie";
peers = [ # peers = [
{ # {
endpoint = "vpn.clerie.de:51820"; # endpoint = "vpn.clerie.de:51820";
persistentKeepalive = 25; # persistentKeepalive = 25;
allowedIPs = [ "0.0.0.0/0" "::/0" "10.20.30.0/24" "2a01:4f8:c0c:15f1::/113" ]; # allowedIPs = [ "0.0.0.0/0" "::/0" "10.20.30.0/24" "2a01:4f8:c0c:15f1::/113" ];
publicKey = "2p1Jqs3bkXbXHFWE6vp1yxHIFoUaZQEARS2nJzbkuBA="; # publicKey = "2p1Jqs3bkXbXHFWE6vp1yxHIFoUaZQEARS2nJzbkuBA=";
} # }
]; # ];
privateKeyFile = "/var/src/secrets/wireguard/wg-clerie"; # privateKeyFile = "/var/src/secrets/wireguard/wg-clerie";
}; # };
}; #};
clerie.monitoring = { clerie.monitoring = {
enable = true; enable = true;

@ -6,6 +6,8 @@
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
profiles.clerie.network-fallback-dhcp.enable = true;
boot.kernelParams = [ "console=ttyS0,115200n8" ]; boot.kernelParams = [ "console=ttyS0,115200n8" ];
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
@ -16,14 +18,16 @@
terminal_output serial terminal_output serial
"; ";
networking.useDHCP = false;
systemd.network.enable = true;
networking.hostName = "tungsten"; networking.hostName = "tungsten";
services.wg-clerie = { #services.wg-clerie = {
enable = true; # enable = true;
ipv6s = [ "2a01:4f8:c0c:15f1::8112/128" ]; # ipv6s = [ "2a01:4f8:c0c:15f1::8112/128" ];
ipv4s = [ "10.20.30.112/32" ]; # ipv4s = [ "10.20.30.112/32" ];
}; #};
clerie.monitoring = { clerie.monitoring = {
enable = true; enable = true;

@ -8,6 +8,7 @@
./hetzner-cloud ./hetzner-cloud
./mercury-vm ./mercury-vm
./netcup ./netcup
./network-fallback-dhcp
]; ];
} }

@ -0,0 +1,22 @@
{ config, lib, ... }:
with lib;
{
options.profiles.clerie.network-fallback-dhcp = {
enable = mkEnableOption "Profile for systemd-network falling back to DHCP on all interfaces";
};
config = mkIf config.profiles.clerie.network-fallback-dhcp.enable {
systemd.network.wait-online.anyInterface = true;
systemd.network.networks."90-lan-dhcp" = {
matchConfig.Type = "ether";
networkConfig.DHCP = true;
linkConfig.RequiredForOnline = "routable";
};
};
}