UPDATE: I figured it out
I used lxqt for a bit but i really liked the functionality that was built into dwm, so i switched back and ive just been sitting down with chatgpt on and off trying different things to get this working and we finally figured it out,
And since now i know what needs to be done
Here is a full tutorial on how to install dwm on nixos
Get the repo
- Get the github repo of dwm, by either manually downloading the zip from the website or by pulling it with git
- If you did the manual download then,
- Unzip the folder in the nixos folder where you have your configuration.nix
- If you pulled it through git then,
- Move the folder into the nixos folder where you have your configuration.nix
- If the folder ends up having a different name than dwm then rename it as such
- If you want to change the name to something else entirely then DONOT FORGET to update the name in your configuration.nix as well
- If you did the manual download then,
Update configuration.nix
- Go into your config
- In there it will be formatted like this,
{ config, lib, pkgs, ... }:
{
imports =
# the
# rest
# of
# your
# config
} # the end of your config
- In there, add the following, anywhere in your configuration.nix
{ config, lib, pkgs, ... }:
{
imports =
# some stuff
# more things
nixpkgs.overlays = [
(final: prev: {
dwm = prev.dwm.overrideAttrs (old: {
src = ./dwm; # this is where you tell nixos to get all of your dwm settings from
});
})
];
# you can put something else here
services.xserver.enable = true;
services.xserver.windowManager.dwm.enable = true;
# you can put something else here
} # the end of your config
- NOTE: I have no idea what nixpkgs.overlays does, i just copied it from chatgpt
Update DWM config
- After this is done, go into the dwm folder and then make a copy of the config.def.h file to something like original.h (just in case you break everything and need to go back)
- Now you can update the config.def.h file to suit your needs
- When that is done, just save the file and do sudo nixos-rebuild switch and reboot the system or you could just logout and login
- Your changes should appear as expected, hopefully