about summary refs log tree commit diff
path: root/common-workstation.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-workstation.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-workstation.nix')
-rw-r--r--common-workstation.nix88
1 files changed, 88 insertions, 0 deletions
diff --git a/common-workstation.nix b/common-workstation.nix
new file mode 100644
index 00000000..fc071d00
--- /dev/null
+++ b/common-workstation.nix
@@ -0,0 +1,88 @@
+{ pkgs, ... }:
+
+{
+  imports = [
+    ./common.nix
+    <nixpkgs/nixos/modules/programs/virtualbox.nix>
+    ./modules/i3
+  ];
+
+  boot.kernelParams = [ "zswap.enabled=1" ];
+  boot.cleanTmpDir = true;
+
+  hardware = {
+    pulseaudio.enable = true;
+    pulseaudio.package = pkgs.pulseaudio.override {
+      useSystemd = true;
+    };
+    opengl = {
+      driSupport32Bit = true;
+      s3tcSupport = true;
+    };
+  };
+
+  fonts = {
+    enableCoreFonts = true;
+    enableFontDir = true;
+    enableGhostscriptFonts = true;
+    fonts = [
+      pkgs.dosemu_fonts
+      pkgs.liberation_ttf
+    ];
+  };
+
+  services = {
+    openssh = {
+      enable = true;
+      permitRootLogin = "without-password";
+    };
+
+    syslogd.tty = "tty13";
+
+    xfs.enable = false;
+
+    gpm = {
+      enable = true;
+      protocol = "exps2";
+    };
+
+    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;
+    };
+  };
+
+  users.extraUsers.aszlig = {
+    uid = 1000;
+    description = "aszlig";
+    group = "users";
+    extraGroups = [ "vboxusers" "wheel" "video" ];
+    home = "/home/aszlig";
+    useDefaultShell = true;
+    createHome = true;
+    createUser = true;
+  };
+}