about summary refs log tree commit diff
path: root/machines
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2019-05-16 12:11:36 +0200
committerProfpatsch <mail@profpatsch.de>2019-05-16 12:12:22 +0200
commit0b37c669da8b5bfa1da5b664831b79f02b17bd17 (patch)
tree728d3a8b615ffc04cf0513a20b14938f196fa263 /machines
parentfdf8266b66221d505cd5353a7ab7ff094dd169dc (diff)
machines/profpatsch: move stuff into base-workstation
Diffstat (limited to 'machines')
-rw-r--r--machines/profpatsch/base-workstation.nix88
-rw-r--r--machines/profpatsch/shiki.nix70
2 files changed, 85 insertions, 73 deletions
diff --git a/machines/profpatsch/base-workstation.nix b/machines/profpatsch/base-workstation.nix
index ad7d6140..dd73909a 100644
--- a/machines/profpatsch/base-workstation.nix
+++ b/machines/profpatsch/base-workstation.nix
@@ -1,4 +1,4 @@
-# A base configuration that still assumes a workstation
+# A base configuration for Thinkpads.
 { pkgs, lib, ... }:
 let
   myPkgs = import ./pkgs.nix { inherit pkgs lib myLib; };
@@ -14,6 +14,9 @@ in {
 
   config = {
 
+    ###########
+    # Hardware
+
     boot.loader = {
       grub.enable = true;
       grub.version = 2;
@@ -34,13 +37,76 @@ in {
     i18n = {
       consoleFont = "lat9w-16";
       consoleKeyMap = "neo";
-      # TODO: kinda broken?
-      # inputMethod = {
-      #   enabled = "fcitx";
-      #   fcitx.engines = with pkgs.fcitx-engines; [ mozc ];
-      # };
     };
 
+    # Enables drivers, acpi, power management
+    vuizvui.hardware.thinkpad.enable = true;
+
+    ###################
+    # Graphical System
+
+    services.xserver = {
+
+      enable = true;
+      layout = "de";
+      xkbVariant = "neo";
+      xkbOptions = "altwin:swap_alt_win";
+      serverFlagsSection = ''
+        Option "StandbyTime" "10"
+        Option "SuspendTime" "20"
+        Option "OffTime" "30"
+      '';
+
+      # otherwise xterm is enabled, creating an xterm that spawns the window manager.
+      desktopManager.xterm.enable = false;
+
+      windowManager.xmonad = {
+        enable = true;
+        enableContribAndExtras = true;
+      };
+
+      displayManager = {
+        sessionCommands = with pkgs; ''
+            #TODO add as nixpkg
+            export PATH+=":$HOME/scripts" #add utility scripts
+            export EDITOR=emacsclient
+            export TERMINAL=${lilyterm}/bin/lilyterm
+
+            ${xorg.xset}/bin/xset r rate 250 35
+
+            set-background &
+            # TODO xbindkeys user service file
+            ${lib.getBin xbindkeys}/bin/xbindkeys
+            # synchronize clipboards
+            ${lib.getBin autocutsel}/bin/autocutsel -s PRIMARY &
+          '';
+      };
+
+      synaptics = {
+        enable = true;
+        minSpeed = "0.6";
+        maxSpeed = "1.5";
+        accelFactor = "0.015";
+        twoFingerScroll = true;
+        vertEdgeScroll = false;
+      };
+
+    };
+
+    fonts.fontconfig = {
+      enable = true;
+      defaultFonts = {
+        monospace = [ "Source Code Pro" "DejaVu Sans Mono" ]; # TODO does not work
+        sansSerif = [ "Liberation Sans" ];
+      };
+      ultimate = {
+        enable = true;
+        substitutions = "combi";
+        preset = "ultimate4";
+      };
+    };
+
+
     programs.ssh.startAgent = false;
 
     ###########
@@ -77,15 +143,7 @@ in {
     # bounded journal size
     services.journald.extraConfig = "SystemMaxUse=50M";
 
-    services.xserver = {
-      # otherwise xterm is enabled, creating an xterm that spawns the window manager.
-      desktopManager.xterm.enable = false;
-
-      windowManager.xmonad = {
-        enable = true;
-        enableContribAndExtras = true;
-      };
-    };
+    vuizvui.programs.fish.fasd.enable = true;
 
     ########
     # Users
diff --git a/machines/profpatsch/shiki.nix b/machines/profpatsch/shiki.nix
index f916905d..6ac7365d 100644
--- a/machines/profpatsch/shiki.nix
+++ b/machines/profpatsch/shiki.nix
@@ -51,12 +51,17 @@ in {
       support32Bit = true;
     };
     # steam
-    hardware.opengl.driSupport32Bit = true;
-
     # needed by some games (TODO: general module for games)
-    # hardware.opengl.driSupport32Bit = true;
+    hardware.opengl.driSupport32Bit = true;
 
-    vuizvui.hardware.thinkpad.enable = true;
+    # TODO: kinda broken?
+    # i18n = {
+    #   inputMethod = {
+    #     enabled = "fcitx";
+    #     Japanese input
+    #     fcitx.engines = with pkgs.fcitx-engines; [ mozc ];
+    #   };
+    # };
 
     ######
     # Nix
@@ -110,8 +115,10 @@ in {
     #   wifiAndEthernet = {
     #     interfaces = [ "wlp3s0" "enp0s25" ];
     #     driverOptions = {
-    #       miimon = "100";
+    #       # how often to check for link failures, i.e. ethernet down (ms)
+    #       miimon = "500";
     #       primary = "enp0s25";
+    #       primary_reselect = "always";
     #       mode = "active-backup";
     #     };
     #   };
@@ -246,59 +253,9 @@ in {
     # Graphical System
 
     services.xserver = {
-      enable = true;
-      layout = "de";
-      xkbVariant = "neo";
-      xkbOptions = "altwin:swap_alt_win";
-      serverFlagsSection = ''
-        Option "StandbyTime" "10"
-        Option "SuspendTime" "20"
-        Option "OffTime" "30"
-      '';
-
-      synaptics = {
-        enable = true;
-        minSpeed = "0.6";
-        maxSpeed = "1.5";
-        accelFactor = "0.015";
-        twoFingerScroll = true;
-        vertEdgeScroll = false;
-      };
-
-
       videoDrivers = [ "intel" ];
-
-      displayManager = {
-        sessionCommands = with pkgs; ''
-            #TODO add as nixpkg
-            export PATH+=":$HOME/scripts" #add utility scripts
-            export EDITOR=emacsclient
-            export TERMINAL=${lilyterm}/bin/lilyterm
-
-            ${xorg.xset}/bin/xset r rate 250 35
-
-            set-background &
-            # TODO xbindkeys user service file
-            ${lib.getBin xbindkeys}/bin/xbindkeys
-            # synchronize clipboards
-            ${lib.getBin autocutsel}/bin/autocutsel -s PRIMARY &
-          '';
-      };
-
     };
 
-    fonts.fontconfig = {
-      enable = true;
-      defaultFonts = {
-        monospace = [ "Source Code Pro" "DejaVu Sans Mono" ]; # TODO does not work
-        sansSerif = [ "Liberation Sans" ];
-      };
-      ultimate = {
-        enable = true;
-        substitutions = "combi";
-        preset = "ultimate4";
-      };
-    };
     fonts.fonts = with pkgs; [
       unfreeAndNonDistributablePkgs.corefonts
       source-han-sans-japanese
@@ -328,9 +285,6 @@ in {
       };
     };
 
-    # TODO: base config?
-    vuizvui.programs.fish.fasd.enable = true;
-
     vuizvui.user.profpatsch.programs.scanning = {
       enable = true;
       #remoteScanners = ''