I just installed NixOS and entered this into my /etc/nixos/configuration.nix:
services.xserver.enable = true;
services.xserver.windowManager.dwm.enable = true;
and then I ran
nixos-rebuild switch followed by systemctl start display-manager and now I have dwm running?No need to manually install
xorg-server, dwm and friends, fiddling to run startx on boot while making sure keyboard mappings are correct1?wtf, nix is magic
Footnotes
-
services.xserver.xkb.layoutgot you covered ↩
nixos-rebuild.1nixos-rebuild switchand then I should have everything up and running again iiuc.passwdseems to be recommended but feels weird to not go full declarative and sethashedPasswordinside configuration.nix.nix-envand how to configuredwm.Footnotes
shell.nixand if you have NixOS on a server you can also write and import adefault.nixto set up a reproducible deploy on any NixOS machine.passwordFilerule to store the encrypted passwords outside of your config code.nix-enventirely as it's NOT reproducible, it's better to usenix-shellfor occasional use or add them to the environment directly.