You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
{
config ,
lib ,
pkgs ,
. . .
}:
let
prgs = config . programs ;
servDM = config . services . desktopManager ;
xDM = config . services . xserver . desktopManager ;
cfg = config . x-banananetwork . improvedDefaults ;
in
{
options = {
services . wayland . enable = lib . mkEnableOption ''
s e n s i b l e d e f a u l t s f o r W a y l a n d s e s s i o n s .
B e a w a r e t h a t a W a y l a n d c o m p o s i t o r o r d e s k t o p e n v i r o n m e n t i s n o t e n a b l e d a u t o m a t i c a l l y
a s t h e r e i s n o m a i n i m p l e m e n t a t i o n o f W a y l a n d .
'' ;
} ;
config = lib . mkMerge [
( lib . mkIf ( cfg . enable ) {
# auto detect if a wayland compatible compositor is already enabled
services . wayland . enable = builtins . any ( x : x ) ( [
prgs . hyprland . enable
prgs . miriway . enable
prgs . river . enable
prgs . sway . enable
prgs . wayfire . enable
( xDM . mate . enable && xDM . mate . enableWaylandSession )
servDM . lomiri . enable # unsure wheather this is using Wayland
servDM . plasma6 . enable
] ) ;
} )
( lib . mkIf ( config . services . wayland . enable ) {
# TODO mirror on home-manager
environment . sessionVariables = {
MOZ_ENABLE_WAYLAND = lib . mkIf config . programs . firefox . enable " 1 " ;
NIXOS_OZONE_WL = " 1 " ;
} ;
# make Steam Input events possible
programs . steam . extest . enable = lib . mkIf config . programs . steam . enable true ;
warnings = lib . mkIf ( xDM . mate . enable && ! xDM . mate . enableWaylandSession ) [
" W a y l a n d & M a t e a r e e n a b l e d , b u t M a t e ‘ s W a y l a n d s u p p o r t i s d i s a b l e d , y o u s h o u l d e n a b l e s e r v i c e s . x s e r v e r . d i s p l a y M a n a g e r . e n a b l e W a y l a n d S e s s i o n "
] ;
} )
] ;
}