dot
vizie's NixOS desktop: Hyprland, CachyOS kernel and gaming tweaks
46fe4cb
3 files changed +25 −0
@@ -16,6 +16,13 @@ | ||
| 16 | 16 | # DEVICE:TYPE:STATE:CONNECTION |
| 17 | 17 | devices= |
| 18 | 18 | wired= |
| 19 | +# eno1 is set up by systemd-networkd (hosts/desktop), so NetworkManager only | |
| 20 | +# sees it as unmanaged; it counts as connected when the link is up. | |
| 21 | +if [; then | |
| 22 | + while ; do | |
| 23 | + [ && { wired=; break; } | |
| 24 | + done | |
| 25 | +fi | |
| 19 | 26 | wifi= |
| 20 | 27 | |
| 21 | 28 | if [; then |
modifiedhosts/desktop/default.nix
@@ -17,6 +17,20 @@ | ||
| 17 | 17 | |
| 18 | 18 | networking.hostName = "desktop"; |
| 19 | 19 | |
| 20 | + # The wired port has a fixed address, set by systemd-networkd rather than | |
| 21 | + # handed out by the router. NetworkManager keeps Wi-Fi and leaves eno1 alone. | |
| 22 | + networking.networkmanager.unmanaged = [ "eno1" ]; | |
| 23 | + systemd.network = { | |
| 24 | + enable = true; | |
| 25 | + networks."10-eno1" = { | |
| 26 | + matchConfig.Name = "eno1"; | |
| 27 | + address = [ "10.0.0.40/24" ]; | |
| 28 | + gateway = [ "10.0.0.1" ]; | |
| 29 | + dns = [ "10.0.0.1" ]; | |
| 30 | + domains = [ "granstrm.com" ]; | |
| 31 | + }; | |
| 32 | + }; | |
| 33 | + | |
| 20 | 34 | # The MacBook, which installs this machine with nixos-anywhere and can log in |
| 21 | 35 | # before the home folder (and its ~/.ssh/authorized_keys) is restored. Root |
| 22 | 36 | # too: a fresh install has no passwords, so that is how yours gets set. |
modifiedmodules/nixos/vm.nix
@@ -48,6 +48,10 @@ | ||
| 48 | 48 | }; |
| 49 | 49 | |
| 50 | 50 | dot.nvidia.enable = false; |
| 51 | + | |
| 52 | + # The VM has no eno1 for systemd-networkd to bring up (NetworkManager does | |
| 53 | + # its network), so don't hold the boot waiting for it. | |
| 54 | + systemd.network.wait-online.enable = false; | |
| 51 | 55 | home-manager.users.vizie.dot.liveConfig = lib.mkForce false; |
| 52 | 56 | |
| 53 | 57 | # The VM's user has no password of its own to unlock the session with. |