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.layout
got you covered ↩
nixos-rebuild
.1nixos-rebuild switch
and then I should have everything up and running again iiuc.passwd
seems to be recommended but feels weird to not go full declarative and sethashedPassword
inside configuration.nix.nix-env
and how to configuredwm
.Footnotes
shell.nix
and if you have NixOS on a server you can also write and import adefault.nix
to set up a reproducible deploy on any NixOS machine.passwordFile
rule to store the encrypted passwords outside of your config code.nix-env
entirely as it's NOT reproducible, it's better to usenix-shell
for occasional use or add them to the environment directly.