This commit is contained in:
2025-12-03 12:36:36 +01:00
parent 64def5d8ae
commit 4f04bde4f2
10 changed files with 292 additions and 56 deletions

View File

@@ -34,44 +34,37 @@
networking = {
hostName = "nix-desktop";
networkmanager.enable = false;
useNetworkd = true;
useDHCP = false;
interfaces.eno1 = {
ipv4.addresses = [
{
address = "192.168.2.40";
prefixLength = 24;
}
];
};
defaultGateway = {
address = "192.168.2.1";
interface = "eno1";
};
nameservers = [
"192.168.2.2"
"1.1.1.1"
"8.8.8.8"
];
wireless = {
networkmanager = {
enable = true;
userControlled.enable = false;
networks = {
"LANFRED".psk = "CooleJungsWG";
};
};
useNetworkd = false;
useDHCP = false;
wireless = {
enable = false; # Disable wpa_supplicant, NetworkManager handles WiFi
};
};
systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false;
# Configure static IP for wired connection via NetworkManager
# Create this file: /etc/NetworkManager/system-connections/eno1.nmconnection
environment.etc."NetworkManager/system-connections/eno1.nmconnection" = {
text = ''
[connection]
id=eno1
type=ethernet
interface-name=eno1
[ipv4]
method=manual
address1=192.168.2.40/24
gateway=192.168.2.1
dns=192.168.2.2;1.1.1.1;8.8.8.8;
[ipv6]
method=auto
'';
mode = "0600";
};
hardware.graphics.enable = true;
system.stateVersion = "25.11"; # Did you read the comment?
}