attempt to add fix for kanshi and usb-c dock
This commit is contained in:
parent
ffecb0e040
commit
171d7390d5
5 changed files with 34 additions and 0 deletions
2
mypackages/kanshi-fix/99-kanshi-fix.rules
Normal file
2
mypackages/kanshi-fix/99-kanshi-fix.rules
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
KERNEL=="card0", SUBSYSTEM=="drm", RUN+="$(pkgs.kanshi-fix}/bin/kanshi-fix"
|
||||
|
||||
2
mypackages/kanshi-fix/default.nix
Normal file
2
mypackages/kanshi-fix/default.nix
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
pkgs.callPackage ./derivation.nix {}
|
||||
20
mypackages/kanshi-fix/derivation.nix
Normal file
20
mypackages/kanshi-fix/derivation.nix
Normal 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
|
||||
'';
|
||||
}
|
||||
4
mypackages/kanshi-fix/kanshi-fix
Executable file
4
mypackages/kanshi-fix/kanshi-fix
Executable 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"
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue