mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-08-26 13:04:01 +02:00
feat(home): add pyclipsync clipboard sync service for niri
xwayland-satellite has no compositor-level clipboard bridging, so X11 clients (WeChat/QQ) and Wayland clients cannot see each other's clipboard. Add the pyclipsync flake input and enable its home-manager module, which installs the daemon as a systemd user service bound to the graphical session.
This commit is contained in:
Generated
+21
@@ -842,6 +842,26 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pyclipsync": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1787650021,
|
||||
"narHash": "sha256-rUcNR2oIAVCQA4TJR1jU38cHnd0j9njNZLOj8n2oeHk=",
|
||||
"owner": "ryan4yin",
|
||||
"repo": "pyclipsync",
|
||||
"rev": "2a427d11e8e2195703a8f84a734cad4c68d5875c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ryan4yin",
|
||||
"repo": "pyclipsync",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
@@ -869,6 +889,7 @@
|
||||
"nur-ryan4yin": "nur-ryan4yin",
|
||||
"pre-commit-hooks": "pre-commit-hooks",
|
||||
"preservation": "preservation",
|
||||
"pyclipsync": "pyclipsync",
|
||||
"wallpapers": "wallpapers"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -168,5 +168,11 @@
|
||||
url = "github:ryan4yin/nur-packages";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Wayland <-> X11 clipboard sync daemon for xwayland-satellite (niri)
|
||||
pyclipsync = {
|
||||
url = "github:ryan4yin/pyclipsync";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,12 +2,18 @@
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
pyclipsync,
|
||||
...
|
||||
}@args:
|
||||
let
|
||||
cfg = config.modules.desktop.niri;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
# provides `services.pyclipsync.enable`
|
||||
pyclipsync.homeModules.default
|
||||
];
|
||||
|
||||
options.modules.desktop.niri = {
|
||||
enable = lib.mkEnableOption "niri compositor";
|
||||
};
|
||||
@@ -56,6 +62,13 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# xwayland-satellite has no compositor-level clipboard bridging, so X11
|
||||
# clients (WeChat/QQ, run via xwayland-satellite) and Wayland clients
|
||||
# cannot see each other's clipboard. This daemon mirrors the X11
|
||||
# CLIPBOARD and the Wayland data device both directions (see the
|
||||
# pyclipsync repo for details).
|
||||
services.pyclipsync.enable = true;
|
||||
|
||||
# NOTE: this executable is used by greetd to start a wayland session when system boot up
|
||||
# with such a vendor-no-locking script, we can switch to another wayland compositor without modifying greetd's config in NixOS module
|
||||
home.file.".wayland-session" = {
|
||||
|
||||
Reference in New Issue
Block a user