[Nix-dev] custom dwm/windowManager package on /run/current-system

Bjørn Forsman bjorn.forsman at gmail.com
Fri Oct 10 23:00:48 CEST 2014


Hi Javier,

On 10 October 2014 18:39, Javier Aguirre <javi at javaguirre.net> wrote:
> Good evening,
>
> I've been playing around with NixOS for a while, I have my own NIXPKGS repo
> with a custom version of dwm, the window manager.
>
> The problem is I can install my custom dwm build, but when I boot the old
> dwm remains(the one in the NixOS original channel) in
> /run/current-system/sw/bin/dwm.

What ends up in /run/current-system/sw/bin/* is controlled by the
environment.systemPackages option. (Installing with nix-env won't add
anything to this directory.)

> I can install it for root(default profile) and my user because I can see a
> change I made to 'dwm -v', but I cannot change the version that boots. I
> located the hash and the current version working for boot, but I don't know
> If I have to install it for a different profile, make a derivation in my
> configuration.nix, etc.

I don't use dwm, so I don't know if this applies to that specific
case. Some NixOS modules have options to specify which derivation to
use for the component it configures. For example, for the tomcat
server, there is a services.tomcat.package option. It defaults to
pkgs.tomcat7, but you can specify something else if you want.

If there is no option you can try using

nixpkgs.config = {
  packageOverrides = pkgs: {
    dwm = myCustomDwmDerivation;
  };
};

in configuration.nix to supply your own definition of 'dwm', used
across the whole system.

Best regards,
Bjørn Forsman


More information about the nix-dev mailing list