Upgrade to NixOS 23.05 and SSD boot

This commit is contained in:
2023-06-08 18:30:16 +02:00
parent 95a024a6e7
commit 110a98c3d4
14 changed files with 107 additions and 117 deletions

View File

@@ -11,12 +11,12 @@ in {
useNetworkd = true;
dhcpcd.enable = false;
};
systemd.services."systemd-networkd-wait-online".enable = false;
systemd.network.wait-online.enable = false;
# Assign a static IP
systemd.network.networks."24-home" = {
name = "eth0";
matchConfig.Name = "eth0";
name = "end0";
matchConfig.Name = "end0";
address = [ "192.168.13.2/24" ];
gateway = [ "192.168.13.1" ];
dns = [ "192.168.13.2" ];
@@ -57,7 +57,9 @@ in {
53 # DNS
];
extraCommands = ''
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o ${
config.systemd.network.networks."24-home".name
} -j MASQUERADE
'';
};
@@ -101,23 +103,22 @@ in {
# DNS server with ad-block
services.dnsmasq = {
enable = true;
servers = [ "51.158.108.203" "137.220.55.93" ];
extraConfig = ''
domain-needed
bogus-priv
no-resolv
settings = {
domain-needed = true;
bogus-priv = true;
no-resolv = true;
listen-address=127.0.0.1,192.168.13.2,10.8.0.1
bind-interfaces
listen-address = [ "127.0.0.1" "192.168.13.2" "10.8.0.1" ];
bind-interfaces = true;
server = [ "51.158.108.203" "137.220.55.93" ];
cache-size=10000
local-ttl=300
cache-size = 10000;
local-ttl = 300;
conf-file=/var/lib/dnsmasq/dnsmasq.blacklist.txt
conf-file = "/var/lib/dnsmasq/dnsmasq.blacklist.txt";
address=/coolneng.duckdns.org/192.168.13.2
'';
address = "/coolneng.duckdns.org/192.168.13.2";
};
};
}