diff options
| author | tv <tv@krebsco.de> | 2026-12-04 01:30:49 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-12-04 03:05:12 +0000 |
| commit | b25c2abad084fa6d2fc930e27998533010b50708 (patch) | |
| tree | 9fde45348b6c9eb2753489486bc978f085023aa5 /modules/Xresources.nix | |
| parent | 607fb1010baae845910e75ba31687bffb259636b (diff) | |
x11: xmonad
From the dirt. Hosts set what's specific to them: XMONAD_MASTER_* by
the unit's environment, and shortcuts by hrm.xmonad.shortcuts.
hrm.xresources replaces tv.Xresources: X resources per display, and "*"
for all, loaded by the session service xresources@ instead of a system
service.
Diffstat (limited to 'modules/Xresources.nix')
| -rw-r--r-- | modules/Xresources.nix | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/modules/Xresources.nix b/modules/Xresources.nix deleted file mode 100644 index afba48e3..00000000 --- a/modules/Xresources.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ config, lib, pkgs, ... }: let - cfg = { - enable = config.services.xserver.enable && config.tv.Xresources != {}; - user = config.krebs.build.user; - }; - local.types.Xresources = lib.types.attrsOf lib.types.str; - - mapAttrNames = f: lib.mapAttrs' (name: lib.nameValuePair (f name)); - mapAttrValues = f: lib.mapAttrs (_: f); -in { - options.tv.Xresources = lib.mkOption { - default = {}; - type = lib.types.attrsOf lib.types.str; - }; - config = { - nixpkgs.overlays = lib.singleton (self: super: { - tv = super.tv or {} // { - Xresources = - self.writeText "Xresources" - (lib.concatStrings - (lib.mapAttrsToList - (name: value: /* xdefaults */ '' - ${name}: ${value} - '') - config.tv.Xresources)); - }; - }); - systemd.services.${if cfg.enable then "Xresources" else null} = { - wantedBy = [ "graphical.target" ]; - after = [ "xmonad.service" ]; - environment = { - DISPLAY = ":${toString config.services.xserver.display}"; - }; - serviceConfig = { - ExecStart = "${pkgs.xrdb}/bin/xrdb ${pkgs.tv.Xresources}"; - RemainAfterExit = true; - SyslogIdentifier = "Xresources"; - Type = "oneshot"; - User = cfg.user.name; - WorkingDirectory = cfg.user.home; - }; - }; - }; -} |
