-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsddm.nix
More file actions
148 lines (130 loc) 路 4.2 KB
/
Copy pathsddm.nix
File metadata and controls
148 lines (130 loc) 路 4.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# sddm.nix - SDDM Display Manager Configuration with Catppuccin Theme
{ config, pkgs, lib, ... }:
let
# Custom Hyprland session that uses home-manager's start-hyprland wrapper
hyprland-session = pkgs.writeTextDir "share/wayland-sessions/hyprland.desktop" ''
[Desktop Entry]
Name=Hyprland
Comment=An intelligent dynamic tiling Wayland compositor
Exec=start-hyprland
Type=Application
DesktopNames=Hyprland
Keywords=tiling;wayland;compositor;
'';
in
{
# SDDM Display Manager Configuration
services.displayManager.sddm = {
enable = true;
# Enable Wayland support
wayland = {
enable = true;
compositor = "kwin"; # Can also use weston if kwin doesn't work
};
# Theme configuration
theme = "catppuccin-mocha";
# Use KDE6 version for better Wayland support
package = pkgs.kdePackages.sddm;
settings = {
# General settings
General = {
DisplayServer = "wayland";
GreeterEnvironment = "QT_WAYLAND_SHELL_INTEGRATION=layer-shell,XCURSOR_THEME=catppuccin-mocha-dark-cursors,XCURSOR_SIZE=24";
InputMethod = ""; # Can be set to "qtvirtualkeyboard" if needed
};
# Theme settings
Theme = {
Current = "catppuccin-mocha";
ThemeDir = "/run/current-system/sw/share/sddm/themes";
FacesDir = "/var/lib/AccountsService/icons";
CursorTheme = "catppuccin-mocha-dark-cursors";
Font = "JetBrainsMono Nerd Font";
EnableAvatars = true;
DisableAvatarsThreshold = 7;
};
# Wayland specific settings
Wayland = {
CompositorCommand = "${pkgs.kdePackages.kwin}/bin/kwin_wayland --no-lockscreen --inputmethod maliit-keyboard";
EnableHiDPI = true;
SessionDir = "${hyprland-session}/share/wayland-sessions";
};
# Autologin (disabled by default, uncomment to enable)
# Autologin = {
# User = "lrabbets";
# Session = "hyprland";
# };
# User settings
Users = {
DefaultPath = "/run/current-system/sw/bin";
HideShells = "";
HideUsers = "";
MaximumUid = 60513;
MinimumUid = 1000;
RememberLastSession = true;
RememberLastUser = true;
ReuseSession = false;
};
};
};
# Ensure SDDM theme and dependencies are installed
environment.systemPackages = with pkgs; [
(catppuccin-sddm.override {
flavor = "mocha";
fontSize = "9";
background = "${./wallpapers/f1-3.png}";
loginBackground = true;
})
catppuccin-cursors.mochaDark # Cursor theme for SDDM/kwin
libsForQt5.qt5.qtquickcontrols2
libsForQt5.qt5.qtgraphicaleffects
kdePackages.qtquick3d
kdePackages.qtvirtualkeyboard
];
# Set default session to Hyprland
services.displayManager.defaultSession = "hyprland";
# Create SDDM configuration directory
systemd.tmpfiles.rules = [
"d /var/lib/sddm 0755 sddm sddm"
"d /var/lib/sddm/.config 0755 sddm sddm"
"d /var/lib/sddm/.config/hypr 0755 sddm sddm"
];
# Create a basic Hyprland config for SDDM
environment.etc."sddm/hyprland.conf" = {
text = ''
# Basic Hyprland configuration for SDDM
monitor=,preferred,auto,1
# Use integrated GPU for SDDM to save power
env = WLR_DRM_DEVICES,/dev/dri/card0
# Basic appearance with Catppuccin Mocha colors
general {
border_size = 2
gaps_in = 5
gaps_out = 10
col.active_border = rgba(cba6f7ff) # Catppuccin Mocha mauve
col.inactive_border = rgba(313244ff) # Catppuccin Mocha surface0
}
decoration {
rounding = 10
blur {
enabled = true
size = 3
passes = 1
}
}
# Basic animations
animations {
enabled = yes
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 3, myBezier
animation = windowsOut, 1, 3, default, popin 80%
animation = fade, 1, 3, default
}
'';
};
# Link the config to SDDM's home directory
system.activationScripts.sddmConfig = ''
if [ ! -f /var/lib/sddm/.config/hypr/hyprland.conf ]; then
ln -sf /etc/sddm/hyprland.conf /var/lib/sddm/.config/hypr/hyprland.conf 2>/dev/null || true
fi
'';
}