[Nix-dev] getting started

Jörg F. Wittenberger Joerg.Wittenberger at softeyes.net
Fri Feb 20 19:22:17 CET 2009


Hi all,

attached is my copy of /etc/nixos/configuration.nix

There where several hurdles to take, but eventually it still does not
work for me.

The worst part seems to be: I can't find out, how to make those packages
available, which are already installed on the system.  For instance, I
have /nix/store/paiq*-gnome-panel.2.2.1/ on my system, but when I try to
start gnome-panel on the command line the command is not found.

Before I ran into these things (which my work around):

a) Don't know whether "root" is permitted to log into a X session.

   Question: when should I add the user?  Before the nixos-install ?  (I
assume this would add the user to the source system, not the target.
Hence I did not try that one.)

b) After adding a user and setting the password, it appears that I MUST
make sure, that there was at least one login, before the X session will
start.

   Solved by
   $ su - newuser

   followed by
   $ initctrl start xserver

c) gnome-terminal dies, because it's called with a "-lt" argument, which
it does not understand.

   Question: how do I find the call site?

   Work around:
   $ cd /nix/store/*-gnome-terminal-*/bin
   $ mv gnome-terminal gnome-terminal.bin
   $ cat << EOF
#!/bin/sh -ex

CMDLN=""

while [ "$1" != "" ]; do
 case $1 in
  -lt) shift;;
  *) CMDLN="$CMDLN $1"; shift;;
 esac
done

$0.bin $CMDLN

EOF

   $ chmod +x gnome-terminal


d) compiz - that's where I died off:

compize (core) - Fatal: No GLXFBConfig for default depth, this isn't
going to work.
...

Thanks for any hint!

/Jörg


-------------- next part --------------
{
  boot = {
    grubDevice = "/dev/sda";
    initrd = {
      extraKernelModules = [  "ata_piix" "ext3" ];
    };
    kernelModules = [ "fuse" "coretemp" ];
  };

  fileSystems = [
   {
     mountPoint = "/";
     label = "nixos";
     fstype = "ext3";
     device = "/dev/sda1";
   }
  ];

  nix = {
    maxJobs = 1;
  };

  networking = {
    enableIntel3945ABGFirmware = false;
    
    # Warning: setting this option to `true' requires acceptance of the
    # firmware license, see http://ipw2200.sourceforge.net/firmware.php?fid=7.
    enableIntel2200BGFirmware = false;
  };

  environment = {
    extraPackages = pkgs: [
      pkgs.fuse
      pkgs.sshfsFuse
      pkgs.aefs
    ];
  };

  security = {
   extraSetuidPrograms = [
    "fusermount"
   ];
  };

  i18n  = {
    consoleKeyMap = "de";
    defaultLocale = "de_DE.UTF=8";
  };

  services = {

    xserver = {
      enable = true;
      videoDriver = "vesa";
      driSupport = true;
      resolutions = [{x = 1400; y = 1050;} {x = 1600; y = 1200;}];
      defaultDepth = 16;
      sessionType = "gnome";
      windowManager = "compiz";
      layout = "de";
      xkbOptions = "eurosign:e";
    };
    
    sshd = {
      enable = true;
    };
  
  };

  fonts = {
    enableGhostscriptFonts = true;
  };

}


More information about the nix-dev mailing list