Xorg: Difference between revisions

Pigs (talk | contribs)
link to desktop environments and window managers categories.
Tags: Mobile edit Mobile web edit Advanced mobile edit
DHCP (talk | contribs)
m fix indentation
 
(2 intermediate revisions by 2 users not shown)
Line 5: Line 5:
On NixOS, users can enable and configure Xorg through the {{nixos:option|services.xserver}} module in their system configuration.  
On NixOS, users can enable and configure Xorg through the {{nixos:option|services.xserver}} module in their system configuration.  


See {{NixOS Manual|name=NixOS Manual: Chapter - X Window Syestem|anchor=#sec-x11}} for information on using X11 with NixOS.
See {{NixOS Manual|name=NixOS Manual: Chapter - X Window System|anchor=#sec-x11}} for information on using X11 with NixOS.


= Tips and tricks =
= Tips and tricks =
Line 16: Line 16:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
  # bigger tty fonts
# bigger tty fonts
  console.font =
console.font =
    "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz";
  "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz";
  services.xserver.dpi = 180;
services.xserver.dpi = 180;
  environment.variables = {
environment.variables = {
    ## Used by GTK 3
  ## Used by GTK 3
    # `GDK_SCALE` is limited to integer values
  # `GDK_SCALE` is limited to integer values
    GDK_SCALE = "2";
  GDK_SCALE = "2";
    # Inverse of GDK_SCALE
  # Inverse of GDK_SCALE
    GDK_DPI_SCALE = "0.5";
  GDK_DPI_SCALE = "0.5";


    # Used by Qt 5
  # Used by Qt 5
    QT_AUTO_SCREEN_SCALE_FACTOR = "1";
  QT_AUTO_SCREEN_SCALE_FACTOR = "1";


    _JAVA_OPTIONS = "-Dsun.java2d.uiScale=2";
  _JAVA_OPTIONS = "-Dsun.java2d.uiScale=2";
  };
};
  # Expose variables to graphical systemd user services
# Expose variables to graphical systemd user services
  services.xserver.displayManager.importedVariables = [
services.xserver.displayManager.importedVariables = [
    "GDK_SCALE"
  "GDK_SCALE"
    "GDK_DPI_SCALE"
  "GDK_DPI_SCALE"
    "QT_AUTO_SCREEN_SCALE_FACTOR"
  "QT_AUTO_SCREEN_SCALE_FACTOR"
  ];
];
</syntaxhighlight>
</syntaxhighlight>


Line 51: Line 51:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
  services.xserver = {
services.xserver = {
    enable = true;
  enable = true;


    ...
  ...


    libinput = {
  libinput = {
      enable = true;
    enable = true;


      # disabling mouse acceleration
    # disabling mouse acceleration
      mouse = {
    mouse = {
        accelProfile = "flat";
      accelProfile = "flat";
      };
    };


      # disabling touchpad acceleration
    # disabling touchpad acceleration
      touchpad = {
    touchpad = {
        accelProfile = "flat";
      accelProfile = "flat";
      };
     };
     };
  };


    ...
  ...


  };
};
</syntaxhighlight>
</syntaxhighlight>


Line 89: Line 89:
= See also =
= See also =


* [[Wayland]]
* [[Nvidia]]
* [[Nvidia]]
* [[AMD GPU]]
* [[AMD GPU]]