Author: raskin
Date: Thu Jul 15 10:39:04 2010
New Revision: 22605
URL: https://svn.nixos.org/websvn/nix/?rev=22605&sc=1

Log:
Trying to create a fresh configuration for backup notebook

Modified:
   configurations/trunk/misc/raskin/backup-notebook.nix
   configurations/trunk/misc/raskin/raskin.nix

Modified: configurations/trunk/misc/raskin/backup-notebook.nix
==============================================================================
--- configurations/trunk/misc/raskin/backup-notebook.nix        Thu Jul 15 
10:27:30 2010        (r22604)
+++ configurations/trunk/misc/raskin/backup-notebook.nix        Thu Jul 15 
10:39:04 2010        (r22605)
@@ -1,10 +1,9 @@
 /* 
 Configuration for NixOS used by Michael Raskin
 - for backup notebook..
-Sorry if #-style comments accidentally break any string
 */
 
-{pkgs, config, ...}:
+{pkgs, config, modulesPath, ...}:
 let 
        kernels = import 
/etc/nixos/configurations/misc/raskin/kernel-options.nix {inherit pkgs;};
 
@@ -14,61 +13,56 @@
                paths = texLivePaths;
        };
 
-        kernelToUse = kernels.baseKernel;
-       packageGroups = import 
/etc/nixos/configurations/misc/raskin/package-groups.nix 
-         {inherit pkgs myTexLive;
-          baseKernel = kernelToUse;
-         };
-
 bootEntries = baseKernel: rec {
-    kernelPackages = let 
-      shippedKernelPackages = pkgs.kernelPackagesFor (baseKernel);
-    in
-    shippedKernelPackages //
-      rec { 
-          klibc = shippedKernelPackages.klibc.passthru.function (x: {
-            # version = "1.5.14";
-            # sha256 = "1cmrqpgamnv2ns7dlxjm61zc88dxm4ff0aya413ij1lmhp2h2sfc";
-           # subdir = "Testing/";
-           addPreBuild = ''
-             ln -s $PWD/linux/include/*/errno.h linux/include/asm || echo 
errno.h already present
-           '';
-         });
-          
-         klibcShrunk = shippedKernelPackages.klibcShrunk.passthru.function {
-           inherit klibc;
-         };
-      };
+#   kernelPackages = let 
+#     shippedKernelPackages = pkgs.linuxPackagesFor (baseKernel);
+#   in
+#   shippedKernelPackages //
+#     rec { 
+#         klibc = shippedKernelPackages.klibc.passthru.function (x: {
+#           # version = "1.5.14";
+#           # sha256 = "1cmrqpgamnv2ns7dlxjm61zc88dxm4ff0aya413ij1lmhp2h2sfc";
+#           # subdir = "Testing/";
+#           addPreBuild = ''
+#             ln -s $PWD/linux/include/*/errno.h linux/include/asm || echo 
errno.h already present
+#           '';
+#         });
+#         
+#         klibcShrunk = shippedKernelPackages.klibcShrunk.passthru.function {
+#           inherit klibc;
+#         };
+#     };
     
-    extraModulePackages = [(kernelPackages.kqemu.passthru.function (x : {
-      #phaseNames = ["defU64"] ++ x.phaseNames;
-      #defU64 = {
-      #  text = ''
-      #  export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Du64=__u64"
-      #   '';
-      #  deps=[];
-      #};
+    kernelPackages = pkgs.linuxPackagesFor baseKernel;
 
-      fixInc = {
+    extraModulePackages = [
+      /*(kernelPackages.kqemu.passthru.function (x : {
+      defU64 = {
         text = ''
-         sed -e '/#include/i#include <linux/sched.h>' -i kqemu-linux.c
-       '';
-       deps = ["minInit" "doUnpack"];
-      };
-      fixMemFunc = {
-        text=''
-         sed -e 's/memset/mymemset/g; s/memcpy/mymemcpy/g; s/void [*]my/static 
void *my/g' -i common/kernel.c
+               export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Du64=__u64"
        '';
-       deps = ["minInit" "doUnpack"];
+        deps=[];
       };
-      phaseNames = ["fixInc" "fixMemFunc"] ++ x.phaseNames;
-      version = "1.4.0pre1";
-    }))
-        /*(kernelPackages.kqemu)*/
+      # version = "1.4.0pre1";
+    }))*/
+       /*(kernelPackages.kqemu.passthru.function (x : {
+             version = "1.4.0pre1";
+       }))*/
+
+        (kernelPackages.kqemu)
        /*(myAtheros kernelPackages)*/
-    ];
+    ]
+    ;
 };
 
+#kernelToUse = (bootEntries kernels.testingKernel);
+kernelToUse = (bootEntries pkgs.linux_2_6_34);
+
+       packageGroups = import 
/etc/nixos/configurations/misc/raskin/package-groups.nix {
+         inherit pkgs myTexLive;
+         baseKernel = kernelToUse;
+       };
+
 base = 
 {
   require = [
@@ -78,12 +72,46 @@
 
   environment = {
     systemPackages = with packageGroups;
+    [(pkgs.runCommand "empty" {} "mkdir $out")] ++ 
+    (if false then minimal else
     (
        pkgs.lib.concatLists 
-       [ extractors consoleBrowsers programmingLanguages 
+       [ 
+       extractors consoleBrowsers programmingLanguages 
        nonNative hwControl toys filesystems networkTools 
        fatXApps windowManagers consoleTools buildSupport 
        utilsX widgets sound graphicView clientServer 
+       misc GCPin versionControl fsTools consoleEditors
+               /*[
+               (pkgs.wrapFirefox pkgs.firefox3_5 "firefox" "")
+               pkgs.xulrunner3_5
+               pkgs.thunderbird pkgs.gajim pkgs.openoffice
+               pkgs.xterm pkgs.xorg.setxkbmap 
+               pkgs.rxvt_unicode pkgs.openssh
+               pkgs.monotone pkgs.vimHugeX 
+               pkgs.diffutils pkgs.subversion16
+               pkgs.utillinuxCurses pkgs.cdrkit
+               pkgs.zsh pkgs.wpa_supplicant
+               pkgs.iproute pkgs.squid pkgs.pythonFull
+               pkgs.xlaunch pkgs.screen pkgs.elinks
+               pkgs.xorg.xkbcomp pkgs.xsel pkgs.xorg.xorgserver
+               pkgs.xscreensaver pkgs.glxinfo 
+               pkgs.neverball pkgs.binutils 
+               pkgs.MPlayer pkgs.xpdf pkgs.evince
+               pkgs.gnupg2 pkgs.bc pkgs.xorg.xev
+               pkgs.xorg.xset pkgs.gnupg pkgs.pinentry
+               pkgs.btrfsProgs pkgs.lsof pkgs.manpages
+               pkgs.jfsUtils pkgs.gcc pkgs.jfsrec pkgs.bind
+               pkgs.zip pkgs.ncat pkgs.relfs pkgs.fuse
+               pkgs.smbfsFuse
+               ]*/
+
+               /*(with pkgs.compizFusion;
+               [
+                       pkgs.compiz 
+                       bcop ccsm ccsmSimple pluginsMain pluginsExtra 
+                       compizManager
+               ])*/
        misc GCPin versionControl consoleEditors]
     );
 
@@ -91,20 +119,23 @@
     nix = pkgs.nixCustomFun ("" + /etc/nixos/nix + "/")
         ""
        ["nix-reduce-build" "nix-http-export.cgi"]
-       ["--with-docbook-xsl=${pkgs.docbook5_xsl}/xml/xsl/docbook/"];
+       ["--with-docbook-xsl=${pkgs.docbook5_xsl}/xml/xsl/docbook/"
+        "--with-docbook-rng=${pkgs.docbook5}/xml/rng/docbook"
+       ];
 
        # I'd like to build ISO's and have them in profile
-    pathsToLink = ["/bin" "/sbin" "/share" "/man" "/info" "/iso"];     
+    pathsToLink = ["/bin" "/sbin" "/share" "/man" "/info" "/iso" "/lib"];
        
        # Most typos leave needed option at default 
        # (mystically..), but create easy-to-find
        # options NixOS has no idea of. Build should break
        # on them.     
-    checkConfigurationOptions = true;
+    #checkConfigurationOptions = true;
   };
 
   boot = rec {
-    grubDevice = "/dev/sda";
+    loader.grub = {
+    device = "/dev/sda";
 
     extraGrubEntries = "
         title Windows
@@ -112,33 +143,70 @@
     ";
 
     copyKernels = true;
+       
+       # I do not want to go near 
+       # GRUB configuration count limit.                                       
                        
+       # Look in nix-dev 
+    configurationLimit = 100;
+    
+    };
 
        # asus-laptop will let me adjust
        # brightness
-    kernelModules = ["usb-storage" "tun" "asus_laptop" "battery" "ac" 
"thermal" "fuse" "kqemu" 
-       "8139too" "p4_clockmod" "ide-cd" "cp2101" "radeonfb" 
-       "ati_agp" "ide_cd_mod" "8139too" "usbhid" "ehci_hcd" "ohci_hcd" 
"uhci_hcd" "sr_mod"
-       "ahci" "loop" "ftdi_sio" "atiixp"
-       # "snd_pcm" "snd_hda_intel" 
+    kernelModules = [
+       "fbcon" "radeonfb" 
+        "usb-storage" "tun" 
+       # "asus_laptop" 
+       "battery" "ac" "thermal" "fuse" "kqemu" 
+       "8139too" "p4_clockmod" "cp2101" 
+       "ati_agp"
+       "ahci" "loop" "ftdi_sio" "snd_pcm" "snd_hda_intel" "radeon"
+       "ipip" "ipv6" "video"
+       "fbdev" 
+       "pata_atiixp" "sr_mod" "ahci" "pktcdvd" "ide-cd-mod"
        ];
 
        # S3 is broken for now, 
        # TuxOnIce works (not in latest kernel yet)
-    extraKernelParams = ["acpi_sleep=s3_bios"];                        
+    extraKernelParams = ["resume=/dev/sda8" "acpi_sleep=s3_bios"];
        
-       # I do not want to go near 
-       # GRUB configuration count limit.                                       
                        
-       # Look in nix-dev 
-    loader.grub.configurationLimit = 100;
-    
-    kernelPackages = (bootEntries kernelToUse).kernelPackages;
-    extraModulePackages = (bootEntries kernelToUse).extraModulePackages;
+    kernelPackages =      kernelToUse.kernelPackages;
+    extraModulePackages = kernelToUse.extraModulePackages;
 
     initrd = {
-       extraKernelModules = ["ext3" "xfs" "sd_mod" "libata" "lzf"];
+       kernelModules = [
+               "libata" "sd_mod" 
+               "i8042" "pcips2" "serio"  
+               "mousedev" "evdev" "psmouse" "sermouse" "synaptics_i2c" 
+               "ext3" "lzf" "crc32c" "btrfs" "libcrc32c" 
+               "zlib_deflate" "unix" "usbhid" "uhci_hcd" "ehci_hcd"
+               "ohci_hcd" "atkbd" "xtkbd" "bfq_iosched" 
+               "tuxonice_core" "tuxonice_swap" "tuxonice_userui"
+               ];
     };
 
+    kernelParams = [
+      "selinux=0"
+      "acpi=on"
+      "apm=off"
+      "console=tty1"
+      "splash=verbose"
+    ];
+    vesa = false;
+
+    resumeDevice = "8:8";
+
     hardwareScan = false;
+
+    postBootCommands = ''
+       ! [ -e /tmp/.dev-tty12 ] && /var/run/current-system/sw/bin/mknod -m 
0600 /tmp/.dev-tty12 c 4 12
+       /bin/sh -c 'while true; do 
+         echo -n "Password: " ; read -s pass; 
+         [ -e /root/.vt12-pass ] && [ "x$pass" = "x$(cat /root/.vt12-pass)" ] 
&& /bin/sh; 
+        [ "x$pass" = "xhaltnow" ] && /var/run/current-system/sw/sbin/halt;
+        [ "x$pass" = "xtouchstore" ] && /var/run/current-system/sw/bin/touch 
/nix/store &
+       done < /tmp/.dev-tty12 &> /tmp/.dev-tty12' &
+    '';
   };
 
   fileSystems = [
@@ -154,23 +222,22 @@
        # My system is mixed utf-8/koi8-r
        # Will be so while I ssh to koi8-r server
        # luit solves the problem, though.
-    defaultLocale = "ru_RU.KOI8-R";                            
+    defaultLocale = "en_US.UTF-8";
                                                                
-    consoleFont = "koi8r-8x16";
-    consoleKeyMap = "ru3";
+    #consoleFont = "koi8r-8x16";
+    consoleKeyMap = "ruwin_cplk-UTF-8";
   };
 
   networking = {
     extraHosts = (import /root/nix-sysconfig/hosts.nix);
     hostName = (import /root/nix-sysconfig/hostname.nix);
 
-       # Plug Ethernet cable - get connectivity
+    # I manage proxy settings manually anyway
     interfaceMonitor = {                                       
-      enable = true;
+      enable = false;
     };
 
     nameservers = [
-       "192.168.0.1"
     ] ++ (import /root/nix-sysconfig/nameservers.nix);
 
   };
@@ -178,10 +245,10 @@
   installer = {
        # Life is easier to control like that
        manifests = if false then [] else [
-               
http://nixos.org/releases/nixpkgs-stdenv-branch/unstable/MANIFEST
+               http://hydra.nixos.org/project/nixpkgs/channel/latest/MANIFEST
+               
http://hydra.nixos.org/job/nix/trunk/build/channel/latest/MANIFEST
+               http://hydra.nixos.org/project/nixos/channel/latest/MANIFEST
                
http://nixos.org/releases/nixpkgs/channels/nixpkgs-unstable/MANIFEST
-               
http://nixos.org/releases/nixpkgs/channels/nixpkgs-stable/MANIFEST
-               http://nixos.org/releases/nix/channels/nix-unstable/MANIFEST
        ];
 
        repoTypes = {
@@ -197,7 +264,7 @@
   security = {
     extraSetuidPrograms = ["fusermount"
       "mount" "umount" "sudo" "xlaunch"
-      "lsof"
+      "lsof" "suid-chroot" "fbterm"
     ];
     setuidOwners = [
       {
@@ -223,7 +290,13 @@
                /etc/sudo-scripts/eth,\\
                /etc/sudo-scripts/wifi,\\
                /etc/sudo-scripts/nonet,\\
-               /etc/sudo-scripts/renice0
+               /etc/sudo-scripts/up-ifs,\\
+               /etc/sudo-scripts/brightness,\\
+               /etc/sudo-scripts/renice0,\\
+               /etc/sudo-scripts/glusterfs-start,\\
+               /etc/sudo-scripts/gvpe-start,\\
+               /etc/sudo-scripts/chmod
+raskin ALL= NOPASSWD: SETENV: /etc/sudo-scripts/checkGw6
 sshguest ALL= /var/run/current-system/sw/bin/ls /home/sshguest
 wwwrun ALL= NOPASSWD: /var/run/current-system/sw/bin/mplayer,\\
        /var/run/current-system/sw/bin/amixer
@@ -249,6 +322,24 @@
     ";
     proxy = "http://127.0.0.1:3128";;
   };
+
+    jobs = {
+           cleanXserverLock = {
+                   name = "clean-xserver-lock";
+                   description = "Clean X lock files";
+                   startOn = "filesystems/started";
+                   script = ''
+                       if ! pgrep X; then 
+                               rm /tmp/.X*-lock;
+                       fi
+                   '';
+                   respawn = false;
+           };
+            networkInterfaces.startOn = "never";
+    };
+
+
+  nixpkgs.config = import (builtins.getEnv "NIXPKGS_CONFIG");
 };
 
 in 
@@ -266,6 +357,10 @@
     ];
   };
 
+  hardware = {
+      firmware = ["/var/lib/firmware"];
+  };
+
   passthru = {
   };
 }

Modified: configurations/trunk/misc/raskin/raskin.nix
==============================================================================
--- configurations/trunk/misc/raskin/raskin.nix Thu Jul 15 10:27:30 2010        
(r22604)
+++ configurations/trunk/misc/raskin/raskin.nix Thu Jul 15 10:39:04 2010        
(r22605)
@@ -34,7 +34,8 @@
     
     kernelPackages = pkgs.linuxPackagesFor baseKernel;
 
-    extraModulePackages = [/*(kernelPackages.kqemu.passthru.function (x : {
+    extraModulePackages = [
+      /*(kernelPackages.kqemu.passthru.function (x : {
       defU64 = {
         text = ''
                export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Du64=__u64"
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to