diff options
author | aszlig <aszlig@redmoonstudios.org> | 2014-10-17 09:18:55 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2014-10-17 09:18:55 +0200 |
commit | 8ab4b1ecb6c4ebafad8f5a7dcaa161894452fb7a (patch) | |
tree | 1026d9711ee20b3729155dc55b833765443b1837 /common-workstation.nix | |
parent | 0dfd318c01bfe851e2255d9c77cfe9043e182b9b (diff) |
common-workstation: Fix eval on empty head config.
Broke evaluation for tishtushi and arilou, because xrandrHeads is set to an empty list over there (aka "unconfigured"). Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'common-workstation.nix')
-rw-r--r-- | common-workstation.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common-workstation.nix b/common-workstation.nix index 3fcff9d6..ff170399 100644 --- a/common-workstation.nix +++ b/common-workstation.nix @@ -115,7 +115,8 @@ in { src = pkgs.slimThemes.nixosSlim; phases = [ "unpackPhase" "patchPhase" "installPhase" ]; patchPhase = let - centerLeft = 100 / (lib.length randrHeads * 2); + headFactor = if randrHeads == [] then 1 else lib.length randrHeads; + centerLeft = 100 / (headFactor * 2); in '' ${pkgs.imagemagick}/bin/mogrify \ -fill '#080010' -draw 'color 0,0 reset' \ |