about summary refs log tree commit diff
path: root/machines
diff options
context:
space:
mode:
authorsternenseemann <git@lukasepple.de>2017-03-26 23:38:34 +0200
committersternenseemann <git@lukasepple.de>2017-03-26 23:38:34 +0200
commit3328c65542307b580e2e3d71f53f86fad85d6eef (patch)
treefbc87934978132951c865cdcb3fb4546ad8dc864 /machines
parent7f2e55cec4172c06e1de80f4090b135c47e41306 (diff)
machines/sternenseemann: refactoring
Diffstat (limited to 'machines')
-rw-r--r--machines/sternenseemann/fliewatuet.nix29
-rw-r--r--machines/sternenseemann/patches/2bwm-config.patch48
-rw-r--r--machines/sternenseemann/pkgs.nix11
-rw-r--r--machines/sternenseemann/schnurrkadse.nix10
4 files changed, 81 insertions, 17 deletions
diff --git a/machines/sternenseemann/fliewatuet.nix b/machines/sternenseemann/fliewatuet.nix
index 7494d47a..2f741935 100644
--- a/machines/sternenseemann/fliewatuet.nix
+++ b/machines/sternenseemann/fliewatuet.nix
@@ -1,13 +1,17 @@
 { config, lib, pkgs, ... }:
 
 let
-   mytexlive = with pkgs.texlive; combine { inherit scheme-medium minted units collection-bibtexextra wrapfig libertine; };
-   mympv = pkgs.mpv.override { scripts = [ pkgs.mpvScripts.convert ]; };
+  myPkgs = import ./pkgs.nix { inherit pkgs lib; };
+
 in {
   nixpkgs.config = {
     allowUnfree = true;
     packageOverides = pkgs: {
       bluez = pkgs.bluez5;
+
+      "2bwm" = pkgs."2bwm".override {
+        patches = [ ./patches/2bwm-config.patch ];
+      };
     };
   };
 
@@ -127,6 +131,7 @@ in {
     psmisc
     bar-xft
     unison
+    ddate
     # aspell
     aspell
     aspellDicts.en
@@ -150,8 +155,9 @@ in {
     isync
     notmuch
     irssi
-    mytexlive
+    myPkgs.texlive
     firefox
+    chromium
     elinks
     termite
     imv
@@ -166,24 +172,22 @@ in {
 
     ## GUI
     # wm etc.
+    xdotool
     xbindkeys
     alock
     dunst
     libnotify
     xorg.xbacklight
     hicolor_icon_theme
-    networkmanagerapplet
-    xclip
     xsel
 
     ## audio / video
-    mympv
+    myPkgs.mpv
     audacity
     lame
     ffmpeg
 
     ## services
-    gutenprint
     acpi
 
     ## games
@@ -208,6 +212,7 @@ in {
     tewi-font
     libertine
     google-fonts
+    shrikhand # because not in google fonts :(
     xorg.fontbitstream100dpi
     xorg.fontbitstreamtype1
     freefont_ttf
@@ -229,7 +234,7 @@ in {
 
   services.printing = {
     enable = true;
-    drivers = [ pkgs.gutenprint pkgs.hplip ];
+    drivers = [ pkgs.gutenprint ];
   };
 
   services.tlp.enable = true;
@@ -246,10 +251,10 @@ in {
     displayManager = {
       sessionCommands =
         ''
-        redshift -c .redshift &
-        xmodmap -e "pointer = 1 25 3 4 5 6 7 8 9"
-        xbindkeys
-        cbatticon &
+        ${pkgs.redshift}/bin/redshift -c .redshift &
+        ${pkgs.xorg.xmodmap}/bin/xmodmap -e "pointer = 1 25 3 4 5 6 7 8 9"
+        ${pkgs.xbindkeys}/bin/xbindkeys
+        ${pkgs.cbatticon}/bin/cbatticon &
         '';
     };
 
diff --git a/machines/sternenseemann/patches/2bwm-config.patch b/machines/sternenseemann/patches/2bwm-config.patch
new file mode 100644
index 00000000..0bdc8b28
--- /dev/null
+++ b/machines/sternenseemann/patches/2bwm-config.patch
@@ -0,0 +1,48 @@
+diff --git a/config.h b/config.h
+index ce0d1d4..c2346c1 100644
+--- a/config.h
++++ b/config.h
+@@ -37,17 +37,11 @@ static const uint8_t borders[] = {3,5,5,4};
+ #define LOOK_INTO "WM_NAME"
+ static const char *ignore_names[] = {"bar", "xclock"};
+ ///--Menus and Programs---///
+-static const char *menucmd[]   = { "my_menu.sh", NULL };
+-static const char *gmrun[]     = { "my_menu2.sh",NULL};
+-static const char *terminal[]  = { "urxvtc", NULL };
++static const char *menucmd[]   = { "dmenu_run", NULL };
++static const char *terminal[]  = { "termite", NULL };
+ static const char *click1[]    = { "xdotool","click", "1", NULL };
+ static const char *click2[]    = { "xdotool","click", "2", NULL };
+ static const char *click3[]    = { "xdotool","click", "3", NULL };
+-static const char *vol_up[]    = { "pamixer", "-u", "-i", "3", "--allow-boost", NULL };
+-static const char *vol_down[]  = { "pamixer", "-u", "-d", "3", "--allow-boost", NULL };
+-static const char *vol_mute[]  = { "amixer", "set", "Master", "mute", "-q", NULL };
+-static const char *bright_up[]  = { "light", "-A", "5", NULL };
+-static const char *bright_down[]  = { "light", "-U", "5", NULL };
+ ///--Custom foo---///
+ static void halfandcentered(const Arg *arg)
+ {
+@@ -186,8 +180,7 @@ static key keys[] = {
+     {  MOD |SHIFT,        XK_Left,       cursor_move,       {.i=TWOBWM_CURSOR_LEFT}},
+     // Start programs
+     {  MOD ,              XK_Return,     start,             {.com = terminal}},
+-    {  MOD ,              XK_w,          start,             {.com = menucmd}},
+-    {  MOD |SHIFT,        XK_w,          start,             {.com = gmrun}},
++    {  MOD ,              XK_d,          start,             {.com = menucmd}},
+     // Exit or restart 2bwm
+     {  MOD |CONTROL,      XK_q,          twobwm_exit,       {.i=0}},
+     {  MOD |CONTROL,      XK_r,          twobwm_restart,    {.i=0}},
+@@ -195,12 +188,7 @@ static key keys[] = {
+     // Fake clicks using xdotool
+     {  MOD |CONTROL,      XK_Up,         start,             {.com = click1}},
+     {  MOD |CONTROL,      XK_Down,       start,             {.com = click2}},
+-	{  MOD |CONTROL,      XK_Right,      start,             {.com = click3}},
+-    {  0x000000,          0x1008ff13, start,             {.com = vol_up}},
+-    {  0x000000,          0x1008ff11,  start,             {.com = vol_down}},
+-    {  0x000000,          0x1008ff15, start,             {.com = vol_mute}},
+-    {  0x000000,          0x1008ff02, start,             {.com = bright_up}},
+-    {  0x000000,          0x1008ff03,  start,             {.com = bright_down}},
++    {  MOD |CONTROL,      XK_Right,      start,             {.com = click3}},
+     // Change current workspace
+        DESKTOPCHANGE(     XK_1,                             0)
+        DESKTOPCHANGE(     XK_2,                             1)
diff --git a/machines/sternenseemann/pkgs.nix b/machines/sternenseemann/pkgs.nix
new file mode 100644
index 00000000..6f0beb36
--- /dev/null
+++ b/machines/sternenseemann/pkgs.nix
@@ -0,0 +1,11 @@
+{ pkgs, lib }:
+
+let
+
+  mpv = pkgs.mpv.override { scripts = [ pkgs.mpvScripts.convert ]; };
+
+  texlive = with pkgs.texlive; combine { inherit scheme-medium minted units collection-bibtexextra wrapfig libertine; };
+
+  urxvt = pkgs.rxvt_unicode-with-plugins.override { plugins = [ pkgs.urxvt_perls ]; };
+
+in { inherit mpv texlive urxvt; }
diff --git a/machines/sternenseemann/schnurrkadse.nix b/machines/sternenseemann/schnurrkadse.nix
index 3b2c4096..dd5fb750 100644
--- a/machines/sternenseemann/schnurrkadse.nix
+++ b/machines/sternenseemann/schnurrkadse.nix
@@ -1,8 +1,8 @@
 { config, lib, pkgs, ... }:
 
 let
-   mytexlive = with pkgs.texlive; combine { inherit scheme-medium minted units collection-bibtexextra ifplatform xstring doublestroke csquotes libertine; };
-   urxvt = pkgs.rxvt_unicode-with-plugins.override { plugins = [ pkgs.urxvt_perls ]; };
+  myPkgs = import ./pkgs.nix { inherit pkgs lib; };
+
 in {
   nixpkgs.config.allowUnfree = true;
   nixpkgs.system = "i686-linux";
@@ -79,7 +79,7 @@ in {
     git
     stow
     acpi
-    urxvt
+    myPkgs.urxvt
     xsel
     sudo
     mosh
@@ -90,14 +90,14 @@ in {
     pavucontrol
     unison
 
-    mytexlive
+    myPkgs.texlive
     pythonPackages.pygments
     python
 
     elinks
     torbrowser
     chromium
-    mpv
+    myPkgs.mpv
     htop
     imv
     screen-message