attempt to add fix for kanshi and usb-c dock

This commit is contained in:
Don Harper 2023-07-25 21:28:08 -05:00
parent ffecb0e040
commit 171d7390d5
5 changed files with 34 additions and 0 deletions

View file

@ -0,0 +1,2 @@
KERNEL=="card0", SUBSYSTEM=="drm", RUN+="$(pkgs.kanshi-fix}/bin/kanshi-fix"

View file

@ -0,0 +1,2 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.callPackage ./derivation.nix {}

View file

@ -0,0 +1,20 @@
{ stdenv }:
stdenv.mkDerivation rec {
name = "kanshi-fix-${version}";
version = "1.4";
src = ./.;
nativeBuildInputs = [ ];
buildInputs = [ ];
dontConfigure = true;
buildPhase = ''
chmod 0755 kanshi-fix
'';
installPhase = ''
mkdir -p $out/bin
cp kanshi-fix $out/bin
'';
}

View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
export SWAYSOCK=/run/user/1000/sway-ipc.1000.$(pgrep -x sway).sock
export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"
swaymsg "output * dpms on"

View file

@ -60,6 +60,11 @@ in
};
services = {
#udev = {
#extraRules = ''
#KERNEL=="card0", SUBSYSTEM=="drm", RUN+=""${pkgs.kanshi-fix}"/bin/kanshi-fix"
#'';
#};
avahi = {
enable = true;
nssmdns = true;
@ -134,6 +139,7 @@ in
nixpkgs.config.permittedInsecurePackages = [ "electron-21.4.0" ];
environment.systemPackages = with pkgs; [
#(callPackage ../mypackages/kanshi-fix/default.nix {})
python-with-my-packages
acpi
aspell