diff options
author | lassulus <lassulus@lassul.us> | 2017-12-04 11:52:00 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2017-12-04 11:52:00 +0100 |
commit | 3a38f5b6eaa7911ffe966821e86cce0603675dfa (patch) | |
tree | ce5b75b52d8b0f31bf9a09512954277208bd1544 | |
parent | 99468fec8fe675ffd224ded2ff91ed22c021bb52 (diff) |
l xserver: add dpi support
-rw-r--r-- | lass/3modules/xserver/default.nix | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lass/3modules/xserver/default.nix b/lass/3modules/xserver/default.nix index c0cb37d63..462c6deef 100644 --- a/lass/3modules/xserver/default.nix +++ b/lass/3modules/xserver/default.nix @@ -10,6 +10,7 @@ let user = config.krebs.build.user; cfg = config.lass.xserver; + xcfg = config.services.xserver; api = { enable = mkEnableOption "lass xserver"; }; @@ -31,11 +32,11 @@ let wantedBy = [ "multi-user.target" ]; requires = [ "xserver.service" ]; environment = { - DISPLAY = ":${toString config.services.xserver.display}"; + DISPLAY = ":${toString xcfg.display}"; XMONAD_STARTUP_HOOK = pkgs.writeDash "xmonad-startup-hook" '' ${pkgs.xorg.xhost}/bin/xhost +LOCAL: & - ${config.services.xserver.displayManager.sessionCommands} + ${xcfg.displayManager.sessionCommands} wait ''; @@ -62,22 +63,26 @@ let XORG_DRI_DRIVER_PATH = "/run/opengl-driver/lib/dri"; # !!! Depends on the driver selected at runtime. LD_LIBRARY_PATH = concatStringsSep ":" ( [ "${pkgs.xorg.libX11}/lib" "${pkgs.xorg.libXext}/lib" ] - ++ concatLists (catAttrs "libPath" config.services.xserver.drivers)); + ++ concatLists (catAttrs "libPath" xcfg.drivers)); }; serviceConfig = { SyslogIdentifier = "xserver"; ExecReload = "${pkgs.coreutils}/bin/echo NOP"; ExecStart = toString [ "${pkgs.xorg.xorgserver}/bin/X" - ":${toString config.services.xserver.display}" - "vt${toString config.services.xserver.tty}" + ":${toString xcfg.display}" + "vt${toString xcfg.tty}" "-config ${import ./xserver.conf.nix args}" "-logfile /dev/null -logverbose 0 -verbose 3" "-nolisten tcp" "-xkbdir ${pkgs.xkeyboard_config}/etc/X11/xkb" + (optional (xcfg.dpi != null) "-dpi ${toString xcfg.dpi}") ]; }; }; + services.xresources.resources.dpi = '' + ${optionalString (xcfg.dpi != null) "Xft.dpi: ${toString xcfg.dpi}"} + ''; systemd.services.urxvtd = { wantedBy = [ "multi-user.target" ]; reloadIfChanged = true; |