summaryrefslogtreecommitdiff
path: root/modules/nixos/x11.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-09-16 02:07:57 +0300
committerAzat Bahawi <azat@bahawi.net>2023-09-16 02:07:57 +0300
commitd58f6d509cd81c6c21739f3bf0fcec7fa623ee9f (patch)
treef8742617b495d478cc8c9b2c1f200e143f2c1d28 /modules/nixos/x11.nix
parent0e41d27187cd230111d44738b06f35efa7537b14 (diff)
2023-09-16
Diffstat (limited to 'modules/nixos/x11.nix')
-rw-r--r--modules/nixos/x11.nix44
1 files changed, 32 insertions, 12 deletions
diff --git a/modules/nixos/x11.nix b/modules/nixos/x11.nix
index f2d850b..b1bca8f 100644
--- a/modules/nixos/x11.nix
+++ b/modules/nixos/x11.nix
@@ -1,6 +1,7 @@
{
config,
lib,
+ pkgs,
...
}:
with lib; let
@@ -12,26 +13,25 @@ in {
nixfiles.modules.fonts.enable = true;
hm = {
- home.sessionVariables = with config.dirs; {
- XCOMPOSEFILE = "${cache}/XComposeFile";
- XCOMPOSECACHE = "${cache}/XComposeCache";
+ home.sessionVariables = {
+ XCOMPOSEFILE = pkgs.writeText "XCompose" ''
+ include "${pkgs.xorg.libX11}/share/X11/locale/en_US.UTF-8/Compose"
+ '';
+ XCOMPOSECACHE = "${config.dirs.cache}/libx11/compose";
};
- xsession.scriptPath = ".xinitrc";
-
xresources.properties =
(let
font = with config.fontScheme.monospaceFont; "${family}:style=${style}:size=${toString size}";
in {
"*.font" = font;
- "Xft.antialias" = 1;
- "Xft.autohint" = 0;
- "Xft.dpi" = 96;
- "Xft.hinting" = 1;
- "Xft.hintstyle" = "hintslight";
- "Xft.lcdfilter" = "lcddefault";
- "Xft.rgba" = "rgb";
+ "Xft.antialias" = mkDefault 1;
+ "Xft.autohint" = mkDefault 0;
+ "Xft.hinting" = mkDefault 1;
+ "Xft.hintstyle" = mkDefault "hintslight";
+ "Xft.lcdfilter" = mkDefault "lcddefault";
+ "Xft.rgba" = mkDefault "rgb";
})
// (with config.colourScheme; {
"*.color0" = black;
@@ -54,6 +54,26 @@ in {
"*.background" = background;
"*.foreground" = foreground;
});
+
+ services.xsettingsd = {
+ enable = true;
+ # https://codeberg.org/derat/xsettingsd#settings
+ settings = let
+ xprop = config.hm.xresources.properties;
+ in {
+ "Net/CursorBlink" = 1;
+ "Net/CursorBlinkTime" = 1200;
+ "Net/DndDragThreshold" = 0;
+ "Net/DoubleClickDistance" = 5;
+ "Net/DoubleClickTime" = 250;
+ "Net/EnableEventSounds" = 1;
+ "Net/EnableInputFeedbackSounds" = 1;
+ "Xft/Antialias" = xprop."Xft.antialias";
+ "Xft/HintStyle" = xprop."Xft.hintstyle";
+ "Xft/Hinting" = xprop."Xft.hinting";
+ "Xft/RGBA" = xprop."Xft.rgba";
+ };
+ };
};
services.xserver = {