fix dbus env
This commit is contained in:
parent
070df903b5
commit
3171f92588
1 changed files with 13 additions and 4 deletions
|
@ -50,6 +50,12 @@ in
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
dbus-sway-environment = pkgs.writeShellScriptBin "dbus-sway-environment" ''
|
||||||
|
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
||||||
|
systemctl --user stop xdg-desktop-portal xdg-desktop-portal-wlr
|
||||||
|
systemctl --user start xdg-desktop-portal xdg-desktop-portal-wlr
|
||||||
|
'';
|
||||||
|
|
||||||
build_conf = with lib; sway_conf:
|
build_conf = with lib; sway_conf:
|
||||||
let
|
let
|
||||||
build_definition_lines = mapAttrsToList (name: value: "set \$${name} ${value}");
|
build_definition_lines = mapAttrsToList (name: value: "set \$${name} ${value}");
|
||||||
|
@ -79,14 +85,15 @@ in
|
||||||
);
|
);
|
||||||
|
|
||||||
conf_path = "sway.conf";
|
conf_path = "sway.conf";
|
||||||
|
|
||||||
# sway_conf = pkgs.writeText "sway.conf" text;
|
|
||||||
in
|
in
|
||||||
with cfg; lib.mkIf (enable && sway.enable) {
|
with cfg; lib.mkIf (enable && sway.enable) {
|
||||||
environment.etc."${conf_path}".text = sway_conf;
|
environment.etc."${conf_path}".text = sway_conf;
|
||||||
|
|
||||||
|
grimmShared.sway.config.autolaunch = lib.singleton dbus-sway-environment;
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
waybar_full
|
waybar_full
|
||||||
|
dbus-sway-environment
|
||||||
] ++ (with pkgs; [
|
] ++ (with pkgs; [
|
||||||
procps
|
procps
|
||||||
slurp
|
slurp
|
||||||
|
@ -130,16 +137,18 @@ in
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
wf-recorder
|
wf-recorder
|
||||||
dmenu
|
dmenu
|
||||||
# wlroots_0_16
|
|
||||||
wmenu
|
wmenu
|
||||||
waybar-mpris
|
waybar-mpris
|
||||||
];
|
];
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--unsupported-gpu"
|
|
||||||
"--config"
|
"--config"
|
||||||
"/etc/${conf_path}"
|
"/etc/${conf_path}"
|
||||||
];
|
];
|
||||||
extraSessionCommands = ''
|
extraSessionCommands = ''
|
||||||
|
# source /etc/profile
|
||||||
|
# test -f $HOME/.profile && source $HOME/.profile
|
||||||
|
systemctl --user import-environment
|
||||||
|
|
||||||
export XDG_CURRENT_DESKTOP=sway
|
export XDG_CURRENT_DESKTOP=sway
|
||||||
export SDL_VIDEODRIVER=wayland
|
export SDL_VIDEODRIVER=wayland
|
||||||
export QT_QPA_PLATFORM=wayland
|
export QT_QPA_PLATFORM=wayland
|
||||||
|
|
Loading…
Reference in a new issue