dotfiles/modules/nixos/profiles/graphical/wm.nix
Christopher Mühl 7af406f315
feat: add Hyprland as an additional compositor alongside Niri
Enables programs.hyprland at the system level, adds xdg-desktop-portal-hyprland
with per-compositor portal routing, and wires up a home-manager config for
endurance mirroring the Niri layout (same keybinds, monitors, window rules).
Niri remains the default SDDM session.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-19 10:53:30 +01:00

81 lines
1.7 KiB
Nix

{
pkgs,
lib,
config,
...
}: let
inherit (lib) mkIf;
sddmTheme = pkgs.sddm-astronaut.override {
embeddedTheme = "japanese_aesthetic";
themeConfig = {
};
};
in {
imports = [
#inputs.niri.nixosModules.niri
];
config = mkIf config.bosun.profiles.graphical.enable {
environment.systemPackages = with pkgs; [
wayland-utils
wl-clipboard
# libsForQt5.qtstyleplugin-kvantum
xwayland-satellite
nautilus
sddmTheme
kdePackages.qtmultimedia # required for our sddm theme
];
programs.niri = {
enable = true;
package = pkgs.niri; # TODO: Use input niri pkgs/overlay!
};
programs.hyprland.enable = true;
services = {
xserver = {
enable = true;
displayManager.setupCommands = ''
/run/current-system/sw/bin/xrandr --output HDMI-A-1 --primary
/run/current-system/sw/bin/xrandr --output DP-3 --right-of HDMI-A-1 --rotate left
'';
};
displayManager = {
defaultSession = "niri";
sddm = let
theme = "sddm-astronaut-theme";
in {
enable = true;
package = pkgs.kdePackages.sddm;
# wayland.enable = true;
inherit theme;
extraPackages = [sddmTheme];
settings.Theme.Current = theme;
};
};
};
xdg.portal = {
enable = true;
# xdgOpenUsePortal = true;
config = {
common.default = "gtk";
hyprland.default = ["hyprland" "gtk"];
};
extraPortals = with pkgs; [
xdg-desktop-portal-gnome
xdg-desktop-portal-gtk
xdg-desktop-portal-hyprland
];
};
security.polkit.enable = true;
};
}