2022-10-31 10:05:30 +01:00
|
|
|
#
|
|
|
|
# Sway configuration
|
|
|
|
#
|
|
|
|
# flake.nix
|
|
|
|
# ├─ ./hosts
|
|
|
|
# │ └─ ./laptop
|
|
|
|
# │ └─ default.nix
|
|
|
|
# └─ ./modules
|
|
|
|
# └─ ./desktop
|
|
|
|
# └─ ./hyprland
|
|
|
|
# └─ hyprland.nix *
|
|
|
|
#
|
|
|
|
|
2024-05-19 17:57:35 +02:00
|
|
|
{ config, lib, user, pkgs, desktop, ... }:
|
2022-10-31 10:05:30 +01:00
|
|
|
|
|
|
|
{
|
2024-05-19 17:57:35 +02:00
|
|
|
imports = [ ../waybar.nix ];
|
2022-10-31 10:05:30 +01:00
|
|
|
|
|
|
|
hardware.opengl = {
|
|
|
|
enable = true;
|
2023-05-19 11:42:24 +02:00
|
|
|
driSupport = true;
|
|
|
|
driSupport32Bit = true;
|
2022-10-31 10:05:30 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
environment = {
|
|
|
|
loginShellInit = ''
|
|
|
|
if [ -z $DISPLAY ] && [ $UID != 0 ] && [ "$(tty)" = "/dev/tty1" ]; then
|
|
|
|
exec sway
|
|
|
|
fi
|
|
|
|
''; # Will automatically open sway when logged into tty1
|
|
|
|
systemPackages = with pkgs; [
|
|
|
|
xdg-desktop-portal-wlr
|
2022-10-31 16:46:15 +01:00
|
|
|
sway
|
2022-10-31 10:05:30 +01:00
|
|
|
swaylock
|
|
|
|
swayidle
|
|
|
|
slurp
|
|
|
|
grim
|
|
|
|
bemenu
|
2023-01-20 20:52:36 +01:00
|
|
|
lxqt.lxqt-openssh-askpass
|
2023-10-15 08:47:04 +02:00
|
|
|
rocmPackages.clr.icd
|
|
|
|
rocmPackages.clr
|
2023-05-19 11:42:24 +02:00
|
|
|
clinfo
|
2024-05-19 17:57:35 +02:00
|
|
|
waybar
|
2024-08-11 19:44:14 +02:00
|
|
|
rot8
|
2024-09-30 20:59:37 +02:00
|
|
|
glib
|
2022-10-31 10:05:30 +01:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
programs = {
|
|
|
|
sway.enable = true;
|
2022-10-31 16:46:15 +01:00
|
|
|
sway.extraSessionCommands = ''
|
|
|
|
export MOZ_ENABLE_WAYLAND="1";
|
|
|
|
export MOZ_WEBRENDER="1";
|
|
|
|
export MOZ_USE_XINPUT2="2";
|
|
|
|
export MOZ_DBUS_REMOTE="1";
|
2024-09-30 20:59:37 +02:00
|
|
|
export WLR_RENDERER="vulkan";
|
2022-10-31 16:46:15 +01:00
|
|
|
export LIBVA_DRIVER_NAME="iHD";
|
|
|
|
export VDPAU_DRIVER="iHD";
|
|
|
|
export XDG_SESSION_TYPE="wayland";
|
2022-11-02 10:56:48 +01:00
|
|
|
#export XDG_CURRENT_DESKTOP="Unity";
|
2022-10-31 16:46:15 +01:00
|
|
|
#export QT_QPA_PLATFORMTHEME="wayland-egl";
|
|
|
|
export GST_VAAPI_ALL_DRIVERS="1";
|
|
|
|
export GTK_THEME="Arc";
|
|
|
|
export _JAVA_AWT_WM_NONREPARENTING="1";
|
|
|
|
#export LIBCL_ALWAYS_SOFTWARE="1"; # For applications in VM like alacritty to work
|
|
|
|
#export WLR_NO_HARDWARE_CURSORS="1"; # For cursor in VM
|
2022-10-31 10:05:30 +01:00
|
|
|
'';
|
2023-01-20 20:52:36 +01:00
|
|
|
ssh.enableAskPassword = true;
|
|
|
|
ssh.askPassword = "${pkgs.lxqt.lxqt-openssh-askpass}/bin/lxqt-openssh-askpass";
|
2022-10-31 16:46:15 +01:00
|
|
|
};
|
2022-10-31 10:05:30 +01:00
|
|
|
|
|
|
|
security.pam.services.swaylock = {};
|
|
|
|
|
|
|
|
xdg.portal = { # Required for flatpak with windowmanagers
|
2022-11-03 16:15:33 +01:00
|
|
|
enable = true;
|
2022-10-31 10:05:30 +01:00
|
|
|
wlr.enable = true;
|
2022-11-03 16:15:33 +01:00
|
|
|
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
2022-10-31 10:05:30 +01:00
|
|
|
};
|
|
|
|
}
|