No description
Find a file
Mads Fagerlund e2085e0e86
network: iwd + networkd instead of NetworkManager; hyprland: AeroSpace-style workspaces
Wi-Fi kept failing with "Secrets were required, but not provided". NM ran
on top of iwd while impala (SUPER+W) drove iwd directly, so two managers
held separate saved networks; iwd couldn't load its own .psk files, asked
NM for the passphrase, and NM had no secret agent to answer. impala is
iwd-only, so NM goes instead: iwd owns Wi-Fi, networkd does DHCP and
resolved does DNS, on both hosts. eduroam's iwd profile is seeded once via
tmpfiles (C, so a password added later is never overwritten). On mbp,
resolved's mDNS is off because avahi owns .local.

On pc the GigE camera link (enp7s0) is now declared: static
192.168.12.1/24, no RAs, not required for online. It used to take AAU's
IPv6 RAs on that segment, which made v6 default out a dead-end port and
every v6-first connection stall until fallback.

Drop the virtual-desktops plugin: SUPER+N now switches only the monitor
that workspace lives on, as in AeroSpace. SUPER+SHIFT+N sends the window
without following, SUPER+Tab goes back, SUPER+ALT/SHIFT+Tab sends the
workspace to the next monitor. pc's three screens get workspaces 1-3 as
their homes again.

New windows no longer open maximized: kitty 0.49 requests maximize ~250ms
after mapping, so suppress app maximize requests (SUPER+F still works).

Also bumps zen-browser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 18:37:13 +02:00
config network: iwd + networkd instead of NetworkManager; hyprland: AeroSpace-style workspaces 2026-10-06 18:37:13 +02:00
firmware update 2026-09-07 23:17:20 +02:00
hosts mbp: move root to btrfs on p8, reclaiming 256G from macOS 2026-10-04 14:35:28 +02:00
.gitignore NixOS flake: mbp (Asahi) + pc (x86), Hyprland/Zen/neovim, README 2026-07-01 18:05:21 +00:00
flake.lock network: iwd + networkd instead of NetworkManager; hyprland: AeroSpace-style workspaces 2026-10-06 18:37:13 +02:00
flake.nix network: iwd + networkd instead of NetworkManager; hyprland: AeroSpace-style workspaces 2026-10-06 18:37:13 +02:00
README.md pc: generic hardware profile (no per-machine gen); trim README 2026-07-01 18:09:31 +00:00

nixos

One flake, two machines. Hyprland + greetd autologin, Zen+Tridactyl, neovim, zsh+starship.

host arch build
mbp aarch64 MacBook M1 Pro (Asahi)
pc x86_64 any UEFI x86
flake.nix          all config (common + home modules, both hosts)
config/            raw configs: hypr eww fuzzel nvim
hosts/*/hardware-configuration.nix   mbp: regenerate on Mac · pc: generic, as-is
firmware/          Mac Wi-Fi/BT blobs — git-add at install. KEEP REPO PRIVATE.

Set time.timeZone in common. Rename a host = change the nixosConfigurations.<name> key + its networking.hostName.

Apply

sudo nixos-rebuild switch --flake ~/nixos#mbp   # or #pc
nix flake update && sudo nixos-rebuild switch --flake ~/nixos#mbp   # update

Roll back = pick an older generation at boot.

Install: MacBook (Asahi)

Full/latest guide: https://github.com/nix-community/nixos-apple-silicon/blob/main/docs/uefi-standalone.md. Back up — a bad partition can brick the Mac.

  1. macOS Terminal: curl https://alx.sh | sh → r resize (≥20 GB free) → f install UEFI environment only, name NixOS → recovery: permissive security. Reboots to U-Boot; power off.
  2. Installer USB (on a Linux+Nix box): nix build github:nix-community/nixos-apple-silicon#installer-bootstrap -o installer then dd the ISO to USB.
  3. Boot USB → sudo su:
sgdisk /dev/nvme0n1 -n 0:0 -s && sgdisk /dev/nvme0n1 -p   # note new 8300 part, e.g. p5
mkfs.ext4 -L nixos /dev/nvme0n1p5
mount /dev/disk/by-label/nixos /mnt && mkdir -p /mnt/boot
mount /dev/disk/by-partuuid/$(cat /proc/device-tree/chosen/asahi,efi-system-partition) /mnt/boot
nixos-generate-config --root /mnt
git clone <private-remote> /mnt/root/nixos && cd /mnt/root/nixos
cp /mnt/etc/nixos/hardware-configuration.nix hosts/mbp/
mkdir -p firmware && cp /mnt/boot/asahi/{all_firmware.tar.gz,kernelcache*} firmware/
git add -f hosts/mbp/hardware-configuration.nix firmware/*
nixos-install --flake .#mbp && reboot

Install: x86

No hardware generation — hosts/pc/hardware-configuration.nix is generic (mounts by label). Boot the NixOS ISO, sudo -i:

parted /dev/nvme0n1 -- mklabel gpt \
  mkpart ESP fat32 1MiB 512MiB set 1 esp on \
  mkpart primary 512MiB 100%
mkfs.fat -F32 -n BOOT /dev/nvme0n1p1
mkfs.ext4 -L nixos    /dev/nvme0n1p2
mount /dev/disk/by-label/nixos /mnt && mkdir -p /mnt/boot && mount /dev/disk/by-label/BOOT /mnt/boot
git clone <private-remote> /mnt/root/nixos && cd /mnt/root/nixos
nixos-install --flake .#pc && reboot

Exotic storage controller won't boot? Add its module to availableKernelModules in hosts/pc/hardware-configuration.nix (nixos-generate-config --show-hardware-config lists it).

After first boot

passwd (ships initialPassword = "changeme"). If you land on a tty instead of Hyprland, change greetd's uwsm start hyprland → Hyprland in common.