about summary refs log tree commit diff
path: root/machines/mmrnmhrm.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2012-11-26 04:09:00 +0100
committeraszlig <aszlig@redmoonstudios.org>2012-11-26 04:09:00 +0100
commitf60b22191853c0076f97a000740ca3b5ac942978 (patch)
tree9a4e60d6a88a5a94186238dedd10315e6ab28e99 /machines/mmrnmhrm.nix
parentfcb7f402230030382b319619a57e512218b317f7 (diff)
Move common NixOS expressions into common.nix.
This should at least clean up some of this mess and only hardware and filesystem
specific stuff should now endup within the respective machine expressions.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'machines/mmrnmhrm.nix')
-rw-r--r--machines/mmrnmhrm.nix176
1 files changed, 12 insertions, 164 deletions
diff --git a/machines/mmrnmhrm.nix b/machines/mmrnmhrm.nix
index 759ef6a8..65e58851 100644
--- a/machines/mmrnmhrm.nix
+++ b/machines/mmrnmhrm.nix
@@ -1,22 +1,9 @@
 {config, pkgs, ...}:
-{
-  require = [
-    <nixos/modules/programs/virtualbox.nix>
-  ];
 
-  nix = {
-    maxJobs = 8;
-    useChroot = true;
-    readOnlyStore = true;
-    extraOptions = ''
-      build-cores = 0
-    '';
-    /*
-    buildMachines = [
-      { hostName = "
-    ];
-    */
-  };
+with pkgs.lib;
+
+{
+  require = singleton ../common.nix;
 
   boot = let
     linuxAszlig = pkgs.linuxManualConfig {
@@ -36,8 +23,6 @@
   in rec {
     kernelPackages = pkgs.linuxPackagesFor linuxAszlig kernelPackages;
 
-    cleanTmpDir = true;
-
     initrd = {
       luks.enable = true;
       luks.devices = [
@@ -48,30 +33,12 @@
       ];
     };
 
-    loader.grub = {
-      enable = true;
-      version = 2;
-
-      devices = [
-        "/dev/disk/by-id/ata-WDC_WD10EAVS-00D7B1_WD-WCAU48931237"
-      ];
-    };
-  };
-
-  hardware = {
-    cpu.intel.updateMicrocode = true;
-    pulseaudio.enable = true;
-    pulseaudio.package = pkgs.pulseaudio.override {
-      useSystemd = true;
-    };
+    loader.grub.devices = [
+      "/dev/disk/by-id/ata-WDC_WD10EAVS-00D7B1_WD-WCAU48931237"
+    ];
   };
 
-  users.defaultUserShell = "/var/run/current-system/sw/bin/zsh";
-
-  networking = {
-    hostName = "mmrnmhrm";
-    wireless.enable = false;
-  };
+  networking.hostName = "mmrnmhrm";
 
   fileSystems = {
     "/boot" = {
@@ -81,7 +48,7 @@
     "/" = {
       device = "/dev/system/root";
       fsType = "btrfs";
-      options = pkgs.lib.concatStringsSep "," [
+      options = concatStringsSep "," [
         "autodefrag"
         "space_cache"
         "inode_cache"
@@ -89,130 +56,11 @@
         "noatime"
       ];
     };
-    /*
-    "/run/nix/remote-stores/dnyarri/nix" = {
-      device = "root@dnyarri:/nix";
-      fsType = "sshfs";
-      options = pkgs.lib.concatStringsSep "," [
-        "compression=yes"
-        "ssh_command=${pkgs.openssh}/bin/ssh"
-        "Ciphers=arcfour"
-        "IdentityFile=/root/.ssh/id_buildfarm"
-      ];
-    };
-    */
   };
 
-  fonts = {
-    enableCoreFonts = true;
-    enableFontDir = true;
-    enableGhostscriptFonts = true;
-    extraFonts = [
-      pkgs.dosemu_fonts
-      pkgs.liberation_ttf
-    ];
+  swapDevices = singleton {
+    device = "/dev/system/swap";
   };
 
-  swapDevices = [
-    { device = "/dev/system/swap"; }
-  ];
-
-  i18n = {
-    consoleKeyMap = "dvorak";
-  };
-
-  services = {
-    openssh = {
-      enable = true;
-      permitRootLogin = "without-password";
-    };
-
-    /*
-    nfs.server = {
-      enable = true;
-      exports = ''
-        /nix dnyarri.redmoon(ro,no_root_squash)
-        /nix/var/nix/db dnyarri.redmoon(rw,no_root_squash)
-      '';
-    };
-    */
-
-    /* mingetty.ttys = [
-      "tty1" "tty2" "tty3" "tty4" "tty5" "tty6"
-      "tty8" "tty9" "tty10" "tty11" "tty12"
-    ]; */
-
-    syslogd.tty = "tty13";
-
-    xfs.enable = false;
-
-    gpm = {
-      enable = true;
-      protocol = "exps2";
-    };
-
-    nixosManual.showManual = false;
-
-    pulseaudio.enable = false;
-
-    printing = {
-      enable = true;
-      drivers = [ pkgs.foo2zjs pkgs.foomatic_filters ];
-    };
-
-    xserver = {
-      enable = true;
-      layout = "dvorak";
-      videoDrivers = [ "nouveau" ];
-
-      windowManager = {
-        i3.enable = true;
-        default = "i3";
-      };
-
-      desktopManager.default = "none";
-
-      displayManager.slim.theme = pkgs.fetchurl {
-        url = "mirror://sourceforge/slim.berlios/slim-fingerprint.tar.gz";
-        sha256 = "0i1igl4iciml3d46n5hl3bbmqsdzzv56akw2l36i9f779kw07ds8";
-      };
-    };
-  };
-
-  /*
-  jobs.vlock_all = {
-    name = "vlock-all";
-    startOn = "keyboard-request";
-    path = [ pkgs.vlock ];
-    script = "vlock -asn";
-    task = true;
-    restartIfChanged = false;
-  };
-  */
-
-  environment.nix = pkgs.nixUnstable;
-  environment.systemPackages = with pkgs; [
-    zsh
-    wget
-    vim_configurable
-    cacert
-  ];
-
-  nixpkgs = {
-    config = {
-      git = {
-        svnSupport = true;
-        guiSupport = true;
-      };
-    };
-  };
-
-  system.fsPackages = with pkgs; [
-    sshfsFuse
-  ];
-
-  # broken -> chroot build -> FIXME
-  #system.copySystemConfiguration = true;
-
-  time.timeZone = "Europe/Berlin";
+  services.xserver.videoDrivers = [ "nouveau" ];
 }