as the thread had mentioned, i had to make a copy of the config.def.h and create a config.h and then i could make changes in there
i did that and to just test things out i changed these lines
static const char col_gray1
static const char col_gray2
static const char col_gray3
static const char col_gray4
static const char col_cyan
i just changed these to random colors
and i changed this
static const char *termcmd = {âstâ, NULL};
to this
static const char *termcmd = {âkittyâ, NULL};
and then i just saved the file and did nixos-rebuild switch
none of these changes took place and i didnt try and change anything else since even the most basic settings arent being updated
i have no idea what to do, i have tried looking for a solution for the past week and there is no documentation, article, video or anything helpful on this topic and i dont know what to do anymore so im just asking here
Are you using git in your directory? If so run the command git add .
Also if you have code press crtl+e here on the forum and write your code in there.
Can you post your config and directory structure with tree (nix-shell -p tree than in your /etc/nixos directory run tree and post the output).
Also you always need to restart dwm to see the changes.
Please press crtl+e and write outputs and code in there. Makes it easier to read.
Also have you done a restart of dwm?
Can you also post your configuration.nix?
will use ctrl+e from now on,
what do you mean by restart dwm, do you mean 'did i do nixos-rebuild switch,
cant share my config since im an idiot and forgot to download a clipboard
No I mean that dwm does not reload the config on the go. You need to restart dwm in order to let dwm apply the changes. To restart it just log out (not lock) and back in.
For the clipboard i can recommend wl-clipboard-rs. Just put this in your packages to have a clipboard
@Postboote
i have a question, when i change the config and do ânixos-rebuild switchâ do i immediately log out and then log back in or do i do reboot and then log back in, because what i do is
change config
do nixos-rebuild switch
do reboot
login into the system
find that nothing has changed
Yeah you can do it but you donât need to restart you whole computer, just dwm by logging out.
But are the changes you made in the config file in present in your config.def.h file in your home-directory.
there is no file in the home directory, the thread i mentioned never told me to do that
ive never used dwm before this
i thought that i would put everything on my nixos folder and it would work
No you donât need to do that. I thought that dwm had a config file and you just edit it. But to configure dwm you need to sort of ârecompile it everytime you do a config changeâ. So there is no config file in your home direcoty.
But can you post your complete config please?
Also try this:
truly, the only reason i wanted to use dwm was because it was a lightweight system and i thought, why not use the lightest system out there as my main one, but if it is this annoying to setup than i guess im just moving on
ive heard lxqt has a builtin window manager thats pretty nice, ill just use that
i really hoped to have solved this problem but i have work to do and i cant spend another week on this
thanks for your help though @Postboote, really appreciate it
Yeah dwmâs configuration is pretty wierd. Lxqt is a good option for a lightweight desktop manager. But if you are looking for dynamic tiling windowmanager you could try out i3 for X11 and for wayland sway. Both are really grate configurable with Nixos. But it is purly a window manager, means no taskbar, etc. If you are looking for a desktop manager like kde there are many options. Lxqt is one option.
For more you can check the Arch Wiki: https://wiki.archlinux.org/title/Desktop_environment
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
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