about summary refs log tree commit diff
path: root/pkgs/profpatsch/default.nix
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2021-04-23 16:02:00 +0200
committerProfpatsch <mail@profpatsch.de>2021-04-23 16:02:36 +0200
commit84d6379392b9f580424ef1ef25c499e698a7d69f (patch)
treed1ae2e661b3cb78c30fbf6c1b1eefd3754854ba8 /pkgs/profpatsch/default.nix
parent594591447c0e9668ac7355b47af961fc181e230e (diff)
pkgs/profpatsch: add xrandr two monitor setup
Just to prove I can.
Diffstat (limited to 'pkgs/profpatsch/default.nix')
-rw-r--r--pkgs/profpatsch/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/profpatsch/default.nix b/pkgs/profpatsch/default.nix
index c4daf05b..c5f8ed94 100644
--- a/pkgs/profpatsch/default.nix
+++ b/pkgs/profpatsch/default.nix
@@ -140,6 +140,8 @@ in rec {
     inherit writeExecline writeHaskellInterpret getBins runInEmptyEnv sandbox;
   };
 
+  xrandr = import ./xrandr.nix { inherit pkgs getBins runExeclineLocal writeExecline toNetstringKeyVal dhall-json; };
+
   inherit (callPackage ./utils-hs {})
     until watch-server
     haskellPackages;
@@ -186,6 +188,15 @@ in rec {
   toNetstring = s:
     "${toString (builtins.stringLength s)}:${s},";
 
+  toNetstringList = xs:
+    lib.concatStrings (map toNetstring xs);
+
+  toNetstringKeyVal = attrs:
+    lib.concatStrings
+      (lib.mapAttrsToList
+        (k: v: toNetstring (toNetstring k + toNetstring v))
+        attrs);
+
   inherit getBins binify;
 
   inherit (import ./sandbox.nix {inherit pkgs writeExecline; })