universedesktop: DWL & Nvidia Fix
This commit is contained in:
@@ -1,4 +1,14 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
{ config, pkgs, lib, ... }: let
|
||||
dwl-startup = pkgs.writeScript "dwl-startup.sh" ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
${pkgs.yambar}/bin/yambar
|
||||
'';
|
||||
|
||||
launch_emacs = pkgs.writeScript "emacsclient-or-start" ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
emacsclient --create-frame --alternate-editor=""
|
||||
'';
|
||||
in {
|
||||
imports = [
|
||||
./wayland.nix
|
||||
];
|
||||
@@ -7,11 +17,32 @@
|
||||
(final: prev: {
|
||||
dwl = prev.dwl.overrideAttrs (old: {
|
||||
postPatch = ''
|
||||
termcmd=${pkgs.foot}/bin/foot
|
||||
menucmd=${pkgs.bemenu}/bin/bemenu
|
||||
export termcmd=${pkgs.foot}/bin/foot
|
||||
export editcmd=${launch_emacs}
|
||||
export menucmd=${pkgs.fuzzel}/bin/fuzzel
|
||||
substituteAll ${./dwl/config.def.h} ./config.def.h
|
||||
'';
|
||||
postInstall = ''
|
||||
sed -i "s#Exec=dwl#Exec=dwl -s ${dwl-startup}#" $out/share/wayland-sessions/dwl.desktop
|
||||
chmod ugo+x $out/share/wayland-sessions/dwl.desktop
|
||||
'';
|
||||
passthru.providedSessions = ["dwl"];
|
||||
});
|
||||
})
|
||||
];
|
||||
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL=1;
|
||||
WLR_NO_HARDWARE_CURSORS=1;
|
||||
SDL_VIDEODRIVER="wayland";
|
||||
QT_QPA_PLATFORM="wayland-egl";
|
||||
QT_WAYLAND_DISABLE_WINDOW_DECORATIONS="1";
|
||||
__JAVA_AWT_WM_NONREPARENTING=1;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
dwl
|
||||
yambar
|
||||
foot
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user