feat: configure desktop
This commit is contained in:
parent
2138743d3e
commit
652b1f3dd3
10 changed files with 201 additions and 15 deletions
|
|
@ -1,4 +1,53 @@
|
|||
{ pkgs, ... }: {
|
||||
home.sessionVariables = {
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
XDG_CURRENT_DESKTOP = "niri";
|
||||
XDG_SESSION_DESKTOP = "niri";
|
||||
QT_QPA_PLATFORM = "wayland;xcb";
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||
QT_ENABLE_HIGHDPI_SCALING = "1";
|
||||
QT_SCALE_FACTOR_ROUNDING_POLICY = "RoundPreferFloor";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
XDG_MENU_PREFIX = "plasma-";
|
||||
};
|
||||
|
||||
systemd.user.services.niri-env-import = {
|
||||
Unit = {
|
||||
Description = "Import Niri Wayland environment into systemd and D-Bus";
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = pkgs.writeShellScript "niri-env-import" ''
|
||||
${pkgs.dbus}/bin/dbus-update-activation-environment --systemd \
|
||||
WAYLAND_DISPLAY \
|
||||
XDG_CURRENT_DESKTOP \
|
||||
XDG_SESSION_DESKTOP \
|
||||
QT_QPA_PLATFORM
|
||||
'';
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
systemd.user.services.niri-flake-polkit = {
|
||||
Unit.After = [ "niri-env-import.service" ];
|
||||
};
|
||||
|
||||
systemd.user.services.xwayland-satellite = {
|
||||
Unit = {
|
||||
Description = "Xwayland satellite";
|
||||
After = [ "graphical-session.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.xwayland-satellite}/bin/xwayland-satellite";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
xdg.configFile."niri/config.kdl".text = ''
|
||||
// Modificadores: Mod = Super (tecla Windows)
|
||||
input {
|
||||
|
|
@ -68,6 +117,6 @@
|
|||
// Screenshot
|
||||
Print { screenshot; }
|
||||
Mod+Print { screenshot-screen; }
|
||||
}
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue