dotfiles/machines/common/linux/sway.nix

85 lines
1.8 KiB
Nix
Raw Normal View History

2023-12-07 15:40:49 +01:00
{
config,
lib,
pkgs,
...
2024-05-07 18:20:52 +02:00
}:
{
2023-12-07 15:40:49 +01:00
config = lib.mkIf (config.dotfiles.desktop == "sway") {
environment.systemPackages = with pkgs; [
# file management
p7zip
unzip
zip
2024-07-28 18:09:11 +02:00
file-roller
nautilus
nautilus-python
sushi
2023-12-07 15:40:49 +01:00
nautilus-open-any-terminal
# thumbnails
webp-pixbuf-loader
ffmpegthumbnailer
];
programs.dconf.enable = true;
2024-05-07 18:20:52 +02:00
environment.pathsToLink = [ "/share/nautilus-python/extensions" ];
2023-12-07 15:40:49 +01:00
environment.sessionVariables.NAUTILUS_4_EXTENSION_DIR = "${config.system.path}/lib/nautilus/extensions-4";
programs.hyprland.enable = true;
2023-12-07 15:40:49 +01:00
programs.sway = {
enable = true;
package = pkgs.swayfx;
2023-12-07 15:40:49 +01:00
extraPackages = with pkgs; [
swaylock-effects
swayidle
];
extraSessionCommands = ''
# session
export XDG_SESSION_TYPE=wayland
export XDG_SESSION_DESKTOP=sway
export XDG_CURRENT_DESKTOP=sway
# wayland
export NIXOS_OZONE_WL=1
export MOZ_ENABLE_WAYLAND=1
export QT_QPA_PLATFORM=wayland
export SDL_VIDEODRIVER=wayland
export _JAVA_AWT_WM_NONREPARENTING=1
'';
wrapperFeatures = {
base = true;
gtk = true;
};
};
services.dbus.packages = with pkgs; [
darkman
nautilus-open-any-terminal
# gcr needed for gnome3 pinentry, managed in Home-Manager
gcr
];
xdg.portal = {
enable = true;
wlr.enable = true;
extraPortals = with pkgs; [
darkman
xdg-desktop-portal-gtk
];
xdgOpenUsePortal = true;
};
2023-12-07 15:40:49 +01:00
services = {
# mounting
gvfs.enable = true;
udisks2.enable = true;
devmon.enable = true;
gnome.sushi.enable = true;
gnome.tracker-miners.enable = true;
2023-12-07 15:40:49 +01:00
# thumbnails
tumbler.enable = true;
};
};
}