[Nix-dev] A couple of questions: X server, profiles

Wouter db uu at denbreejen.net
Sat May 12 17:18:31 CEST 2007


Felix Breuer wrote:
> Hello!
>
> I have managed to install NixOS from the LiveCD, which was quite a 
> pleasant experience. I am now trying to get X running. I have done
>
>   nixos-rebuild switch
>
> after setting up /etc/nixos/configuration.nix as the attached file 
> shows. However I fail to start X.
>
> * I was unable to find the familiar startx, and running Xorg 
> -configure directly fails.

try: initctl start xserver

,nix uses upstart, see for more information: http://upstart.ubuntu.com/

>
> * I have not fully understood the profile-management yet. 
> .nix-profiles points to a "default" profile which is not present in 
> the profiles directory. How do I create it? Which profile contains the 
> links to X?
your default profile (where ~/.nix-profile points to) is just your 
current profile, every nixos-rebuild switch generates a new profile and 
takes care of the links to X and upstart jobs. You can switch back an 
forward between profiles.

>
> * Also: How do I manage user accounts under NixOS? Should I just run 
> adduser as usual? What is the proper way to set up the profiles of new 
> users?
You can just use useradd, on login, nix will create the link 
.nix-profile in the home directory

>
> * You seem to be running a couple of desktop systems under NixOS. 
> Could you post more configurations of such systems along with how the 
> profiles of desktop users should be set up? The only desktop 
> configuration I was able to find is 
> https://svn.cs.uu.nl:12443/repos/trace/configurations/trunk/misc/eelco-tyros.nix 
>
You don't really have to set up a profile for a desktop user, I can show 
u the services part of my configurations.nix,

  services = {
    sshd = {
      enable = true;
    };
    xserver = {
      enable = true;
      windowManager = "compiz";                #twm,compiz, metacity
      sessionType = "kde";             #gnome, xterm, kde

      resolutions = [ { x = 1920; y = 1200; } { x = 1600; y = 1200; } { 
x = 1280; y = 1024; } { x = 1024; y = 768; } { x = 800; y = 600; } { x = 
640; y = 480; } ];
      videoDriver = "nvidia";  #vesa, i810, nvidia
      driSupport = true;
    };
  };

but you could try this for now since nvidia isn't submitted yet (see below):

  services = {
    sshd = {
      enable = true;
    };
    xserver = {
      enable = true;
      windowManager = "metacity";                #twm,compiz, metacity
      sessionType = "kde";             #gnome, xterm, kde

      resolutions = [ { x = 1280; y = 1024; } { x = 1024; y = 768; } { x 
= 800; y = 600; } { x = 640; y = 480; } ];
      videoDriver = "vesa";  #vesa, i810, nvidia
      driSupport = true;
    };
  };

>
> * What Xorg drivers that are suitable for nVidia graphics cards (in my 
> case an old Geforce Go 2) are available under NixOS?
I've got the nvidia drivers working and will submit them soon after i've 
removed some hacks ;)
>
>
> Thanks a lot,
> Felix
> ------------------------------------------------------------------------
>
> {
>   boot = {
>     grubDevice = "/dev/sda";
>   };
>
> #  environment = {
> #    extraPackages = pkgs: [
> #      pkgs.gnome
> #    ];
> #  };
>
>   fileSystems = [
>     { mountPoint = "/";
>       device = "/dev/sda7";
>     }
>   ];
>
>   i18n = {
>     consoleKeyMap = "de-latin1-nodeadkeys";
>   };
>
>   swapDevices = [
>     { device = "/dev/sda6"; }
>   ];
>   
>   services = {
>     sshd = {
>       enable = true;
>     };
>
>     xserver = {
>       enable = true;
>       videoDriver = "vesa";
>       resolutions = [{x = 1024; y = 768;} {x = 800; y = 600;}];
>       driSupport = false;
>       #windowManager = "compiz";
>       sessionType = "gnome";
>     };
>   };
> }
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at cs.uu.nl
> https://mail.cs.uu.nl/mailman/listinfo/nix-dev
>   




More information about the nix-dev mailing list