about summary refs log tree commit diff
path: root/common.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2014-07-25 16:52:46 +0200
committeraszlig <aszlig@redmoonstudios.org>2014-07-25 16:52:46 +0200
commitfb1ddce32989fdea137f2b225ae4c24d2badf3a4 (patch)
tree7e4cb2e11e65b9ef8bc28e96f879c723ecd1de83 /common.nix
parent9add1880bdb7b905f51768dd13470e86e5393624 (diff)
common: Factor out common workstation options.
Those options reside now in common-workstation.nix but it's only a
preliminary step, in the long term I guess we want to have this as
modular as possible.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'common.nix')
-rw-r--r--common.nix147
1 files changed, 11 insertions, 136 deletions
diff --git a/common.nix b/common.nix
index 243840bc..a3ceef6d 100644
--- a/common.nix
+++ b/common.nix
@@ -1,10 +1,6 @@
-{config, pkgs, ...}:
-{
-  imports = [
-    <nixpkgs/nixos/modules/programs/virtualbox.nix>
-    ./modules/i3
-  ];
+{ config, pkgs, ... }:
 
+{
   nix = {
     package = pkgs.nixUnstable;
     useChroot = true;
@@ -14,136 +10,22 @@
     '';
   };
 
-  boot = {
-    cleanTmpDir = true;
-
-    loader.grub = {
-      enable = true;
-      version = 2;
-    };
-
-    kernelParams = [ "zswap.enabled=1" ];
+  boot.loader.grub = {
+    enable = true;
+    version = 2;
   };
 
-  hardware = {
-    cpu.intel.updateMicrocode = true;
-    pulseaudio.enable = true;
-    pulseaudio.package = pkgs.pulseaudio.override {
-      useSystemd = true;
-    };
-    opengl = {
-      driSupport32Bit = true;
-      s3tcSupport = true;
-    };
-  };
+  hardware.cpu.intel.updateMicrocode = true;
 
   users.defaultUserShell = "/var/run/current-system/sw/bin/zsh";
 
-  networking = {
-    wireless.enable = false;
-    firewall.enable = false;
-  };
-
-  fileSystems = {
-    /*
-    "/run/nix/remote-stores/mmrnmhrm/nix" = {
-      device = "root@mmrnmhrm:/nix";
-      fsType = "sshfs";
-      noCheck = true;
-      options = pkgs.lib.concatStringsSep "," [
-        "comment=x-systemd.automount"
-        "compression=yes"
-        "ssh_command=${pkgs.openssh}/bin/ssh"
-        "Ciphers=arcfour"
-        "IdentityFile=/root/.ssh/id_buildfarm"
-      ];
-    };
-    */
-  };
-
-  fonts = {
-    enableCoreFonts = true;
-    enableFontDir = true;
-    enableGhostscriptFonts = true;
-    fonts = [
-      pkgs.dosemu_fonts
-      pkgs.liberation_ttf
-    ];
-  };
-
-  i18n = {
-    consoleKeyMap = "dvorak";
-  };
+  networking.wireless.enable = false;
+  networking.firewall.enable = false;
 
+  i18n.consoleKeyMap = "dvorak";
   programs.ssh.startAgent = false;
 
-  services = {
-    openssh = {
-      enable = true;
-      permitRootLogin = "without-password";
-    };
-
-    syslogd.tty = "tty13";
-
-    xfs.enable = false;
-
-    gpm = {
-      enable = true;
-      protocol = "exps2";
-    };
-
-    nixosManual.showManual = false;
-
-    printing = {
-      enable = true;
-      drivers = [ pkgs.foo2zjs pkgs.foomatic_filters ];
-    };
-
-    udev.extraRules = ''
-      SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", \
-        ATTRS{serial}=="0001", OWNER="aszlig", SYMLINK+="axbo"
-      SUBSYSTEM=="usb*|tty", ACTION=="add|change", ATTRS{idVendor}=="0403", \
-        ATTRS{idProduct}=="6001", OWNER="aszlig" # Enttec
-    '';
-
-    xserver = {
-      enable = true;
-      layout = "dvorak";
-
-      startGnuPGAgent = true;
-
-      displayManager.sessionCommands = ''
-        ${pkgs.redshift}/bin/redshift -l 48.428404:10.866007 &
-      '';
-
-      desktopManager.default = "none";
-      desktopManager.xterm.enable = false;
-
-      displayManager.lightdm.enable = true;
-    };
-  };
-
-  /*
-  jobs.vlock_all = {
-    name = "vlock-all";
-    startOn = "keyboard-request";
-    path = [ pkgs.vlock ];
-    script = "vlock -asn";
-    task = true;
-    restartIfChanged = false;
-  };
-  */
-
-  users.extraUsers.aszlig = {
-    uid = 1000;
-    description = "aszlig";
-    group = "users";
-    extraGroups = [ "vboxusers" "wheel" "video" ];
-    home = "/home/aszlig";
-    useDefaultShell = true;
-    createHome = true;
-    createUser = true;
-  };
+  services.nixosManual.showManual = false;
 
   environment.systemPackages = with pkgs; [
     binutils
@@ -162,13 +44,6 @@
   ];
 
   nixpkgs.config = import ./nixpkgs/config.nix;
-
-  system.fsPackages = with pkgs; [
-    sshfsFuse
-  ];
-
-  # broken -> chroot build -> FIXME
-  #system.copySystemConfiguration = true;
-
+  system.fsPackages = with pkgs; [ sshfsFuse ];
   time.timeZone = "Europe/Berlin";
 }