fix: patch kanshi-sni reconnect handling

This commit is contained in:
2026-04-15 10:45:22 -07:00
committed by Kat Huang
parent 18c8e0324f
commit 89c8c0bdc3
2 changed files with 109 additions and 3 deletions

View File

@@ -1,16 +1,26 @@
{ config, inputs, pkgs, makeEnable, ... }:
let
system = pkgs.stdenv.hostPlatform.system;
kanshiSniPackage =
inputs.kanshi-sni.packages.${system}.default.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [
./patches/kanshi-sni-refresh-and-reconnect.patch
];
});
in
makeEnable config "myModules.sni" true {
home-manager.sharedModules = [
{
systemd.user.services.kanshi-sni = {
Unit = {
Description = "kanshi-sni tray app";
After = [ "graphical-session.target" "tray.target" ];
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" "tray.target" "kanshi.service" ];
PartOf = [ "graphical-session.target" "kanshi.service" ];
Requires = [ "tray.target" ];
Wants = [ "kanshi.service" ];
};
Service = {
ExecStart = "${inputs.kanshi-sni.packages.${pkgs.stdenv.hostPlatform.system}.default}/bin/kanshi-sni";
ExecStart = "${kanshiSniPackage}/bin/kanshi-sni";
Restart = "always";
RestartSec = 3;
};