Personal NixOS flake configuration.
flake.nix- flake inputs and NixOS configurationshosts/- host-level system configurationhomes/- Home Manager user configurationmodules/nixos/- reusable NixOS modulesmodules/home/- reusable Home Manager modulesmodules/shared/- shared data used by hosts and modules
hosts/thinkpad/default.nix- ThinkPad system configurationhosts/thinkpad/hardware-configuration.nix- generated hardware confighosts/thinkpad/keyboard.nix- host keyboard selection and built-in keyboard confighosts/thinkpad/monitors.nix- host monitor names, fallback rules, and lid support
Host files pass machine-specific data into Home Manager through extraSpecialArgs.
homes/luka/default.nix- base user Home Manager configurationhomes/luka/hosts/thinkpad.nix- ThinkPad-specific Home Manager imports
Hyprland is split between system and user configuration:
modules/nixos/wayland/hyprland.nixenables Hyprland, SDDM, XWayland, and lid policy.modules/home/wayland/hyprland.nixconfigures keybindings, inputs, monitor rules, lid handling, and idle locking.
Keyboard profiles are defined as structured data. Host-specific keyboards live in the host keyboard file. Reusable external keyboards live in modules/shared/keyboards.nix and are selected per host.
Monitor data is host-specific. The ThinkPad monitor file defines eDP-1 as the internal panel, a fallback Hyprland monitor rule, and hasLid = true.
Build the thinkpad configuration:
sudo nixos-rebuild build --flake .#thinkpadSwitch to it:
sudo nixos-rebuild switch --flake .#thinkpad