Files
nix-dotfiles-v2/modules/xdg.nix
T
2026-01-06 20:22:40 +01:00

69 lines
1.9 KiB
Nix

{
pkgs,
lib,
config,
...
}:
{
environment.systemPackages = [
pkgs.xdg-desktop-portal-gtk
pkgs.xdg-desktop-portal-gnome
pkgs.xdg-desktop-portal
];
# XDG related configurations
xdg = {
# Enable desktop portal integration
portal = {
enable = true; # Enable the portal system
xdgOpenUsePortal = true; # Use portal for opening files and URLs
# Additional portals for specific environments
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
xdg-desktop-portal
xdg-desktop-portal-gnome
kdePackages.xdg-desktop-portal-kde # For KDE environment
];
# Configuration packages for portals (like GNOME session, Niri, etc.)
configPackages = with pkgs; [
gnome-session
niri
];
};
# Enable autostart functionality (launch apps on login)
autostart.enable = true;
# Enable menu support for applications
menus.enable = true;
# Enable icon theme support (icons for applications, etc.)
icons.enable = true;
# Enable sounds for system events (like notifications)
sounds.enable = true;
# Terminal execution for XDG spec
terminal-exec.enable = true;
};
# Enable MIME type handling for file associations
xdg.mime.enable = true;
# Enable additional configurations for portals
xdg.portal.wlr.enable = false; # Disable Wayland/Weston portal support (as you've commented out)
xdg.portal.lxqt.styles = true; # Enable LXQt portal styles (optional)
xdg.portal.lxqt.enable = false; # Disable LXQt portal integration (commented out as unnecessary)
# Icons
xdg.icons.fallbackCursorThemes = [ "Adwaita" ]; # Set a default cursor theme (you can change this)
# Terminal execution configuration
xdg.terminal-exec.package = pkgs.xterm; # Choose the terminal emulator (can be changed to your preference)
xdg.terminal-exec.settings = { }; # Terminal-specific settings (customizable)
}