summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2017-09-09 15:04:51 +0200
committerAlan Pearce2017-09-09 16:49:30 +0200
commit97ae80b5109f6ad75bf9464d166db6860f76d7c0 (patch)
treeb57920ebe7d915532810337354a1b1ef033cf3c0
parentcf85d19331d519f99ffd8652b6a279acfaa3f9be (diff)
downloadnixfiles-97ae80b5109f6ad75bf9464d166db6860f76d7c0.tar.lz
nixfiles-97ae80b5109f6ad75bf9464d166db6860f76d7c0.tar.zst
nixfiles-97ae80b5109f6ad75bf9464d166db6860f76d7c0.zip
Add xserver modules
-rw-r--r--modules/trackball.nix13
-rw-r--r--modules/xserver.nix86
-rw-r--r--satoshipad.nix2
3 files changed, 101 insertions, 0 deletions
diff --git a/modules/trackball.nix b/modules/trackball.nix
new file mode 100644
index 00000000..9aa5abc0
--- /dev/null
+++ b/modules/trackball.nix
@@ -0,0 +1,13 @@
+{ config, pkgs, ... }:
+
+{ services.xserver.config = ''
+    Section "InputClass"
+        Identifier "Trackball (No Acceleration)"
+        MatchIsPointer "yes"
+        MatchIsTouchpad "no"
+        MatchProduct "Trackball"
+        Option "AccelerationProfile" "-1"
+        Option "AccelerationScheme" "none"
+    EndSection
+  '';
+}
diff --git a/modules/xserver.nix b/modules/xserver.nix
new file mode 100644
index 00000000..45caef7a
--- /dev/null
+++ b/modules/xserver.nix
@@ -0,0 +1,86 @@
+{ config, pkgs, ... }:
+
+{ services.xserver = {
+    enable = true;
+    enableCtrlAltBackspace = true;
+    exportConfiguration = true;
+  };
+
+  environment.sessionVariables = {
+    XCURSOR_PATH = [
+      "${config.system.path}/share/icons"
+      "$HOME/.icons"
+      "$HOME/.nix-profile/share/icons/"
+    ];
+  };
+
+  environment.systemPackages = with pkgs; [
+    xorg.xmodmap
+    xorg.xinit
+    xorg.xev
+    xorg.xdpyinfo
+    xclip
+
+    vanilla-dmz
+
+    hicolor_icon_theme
+    adapta-gtk-theme
+    flat-plat
+    paper-gtk-theme
+    paper-icon-theme
+    numix-gtk-theme
+    numix-icon-theme
+
+    gtk-engine-murrine
+    gtk_engines
+  ];
+
+  fonts = {
+    enableFontDir = true;
+    enableDefaultFonts = true;
+    fontconfig = {
+      defaultFonts = {
+        monospace = [ "Roboto Mono" ];
+        sansSerif = [ "Noto Sans" ];
+        serif = [ "Noto Serif" ];
+      };
+      ultimate = {
+        enable = true;
+        # presets:
+        # ultimate1 ultimate2 ultimate3 ultimate4 ultimate5 osx windowsxp
+        preset = "ultimate3";
+      };
+    };
+    fonts = with pkgs; [
+      anonymousPro
+      cantarell_fonts
+      carlito
+      cm_unicode
+      dejavu_fonts
+      fantasque-sans-mono
+      fira
+      fira-code
+      fira-mono
+      font-droid
+      font-awesome-ttf
+      hack-font
+      nerdfonts
+      iosevka
+      liberation_ttf
+      noto-fonts
+      mononoki
+      opensans-ttf
+      paratype-pt-mono
+      paratype-pt-sans
+      paratype-pt-serif
+      roboto
+      roboto-mono
+      source-code-pro
+      source-sans-pro
+      source-serif-pro
+      terminus_font
+      ubuntu_font_family
+      xorg.fontxfree86type1
+    ];
+  };
+}
diff --git a/satoshipad.nix b/satoshipad.nix
index 923a3b26..b5f48a0c 100644
--- a/satoshipad.nix
+++ b/satoshipad.nix
@@ -15,6 +15,8 @@
     ./modules/dotfiles.nix
     ./modules/berlin.nix
     ./modules/colemak.nix
+    ./modules/trackball.nix
+    ./modules/xserver.nix
   ];
 
   networking.hostName = "satoshipad";