Hi James, On Sat, May 26, 2012 at 6:19 AM, James Cook <[email protected]> wrote: > NixOS currently generates an xorg.conf file based on various options > services.xserver.*. Unfortunately these options are not quite > flexible enough to support my preferred configuration[0]. For the past > few months, I've gotten around this by doing two things:
Where have you look for information, this means that you did not found the right answer before making attempts to patch NixOS, which exactly why I introduce NixOS module system ;-) > 0. Add "services.xserver.config = builtins.readFile ./xorg.conf;" to > configuration.nix (referring to my own xorg.conf) > 1. Patch modules/services/x11/xserver.nix to remove > "services.xserver.config = '' ... ''". If I don't do this, then the > resulting x.org configuration consists of the default configuration > concatenated with my configuration. Have you tried mkOverride ? Options are by default merged based on the type of the option. strings are concatenated, but mkOverride is getting rid of al other definitions and replace them by your current one. So, at best you should never have to modify NixOS files. services.xserver.config = pkgs.lib.mkOverride 50 (builtins.readFile ./xorg.conf); > I would prefer to replace step 1 with something simple like: > 1. set "services.xserver.generateConfig = false;" in configuration.nix This does not seems necessary anymore. Cheers, -- Nicolas Pierron http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/ _______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
