good status, sddm / niri misconfig for screen fix

This commit is contained in:
Prouk committed 2026-10-02 14:57:09 +02:00
1 parent ee97c00b65
commit b80d6b9b1f
21 files changed
+146 -220

No files matched your search

+1 -1
View File
@@ -12,7 +12,7 @@
./network/bluetooth.nix
./network/usb.nix
./steam/steam.nix
./steam/programs.nix
./programs/obs.nix
];
boot.loader.systemd-boot.enable = true;
+62 -2
View File
@@ -1,7 +1,67 @@
{ ... }:
{ pkgs, lib, config, ... }:
let
# Same wallpaper niri displays (see home/config/default.nix).
wallpaper = ../../assets/wallpaper.png;
sddmTheme =
(pkgs.sddm-astronaut.override {
themeConfig = {
Background = "Backgrounds/wallpaper.png";
CropBackground = "true";
};
}).overrideAttrs
(old: {
postInstall = (old.postInstall or "") + ''
chmod u+w $out/share/sddm/themes/sddm-astronaut-theme/Backgrounds
install -Dm644 ${wallpaper} $out/share/sddm/themes/sddm-astronaut-theme/Backgrounds/wallpaper.png
'';
});
# Weston (the greeter compositor) must use the same modes as niri
# (home/config/niri/outputs.kdl), otherwise the monitors do a full
# modeset when niri takes over, causing a black screen on login.
xkb = config.services.xserver.xkb;
westonIni = (pkgs.formats.iniWithGlobalSection { }).generate "weston.ini" {
sections = {
libinput = {
enable-tap = config.services.libinput.mouse.tapping;
left-handed = config.services.libinput.mouse.leftHanded;
};
keyboard = {
keymap_model = xkb.model;
keymap_layout = xkb.layout;
keymap_variant = xkb.variant;
keymap_options = xkb.options;
};
};
};
westonOutputs = pkgs.writeText "weston-outputs.ini" ''
[output]
name=DP-2
mode=2560x1440@240
[output]
name=DP-3
mode=1920x1080@144
transform=rotate-90
'';
westonConfig = pkgs.runCommand "weston.ini" { } ''
cat ${westonIni} > $out
echo >> $out
cat ${westonOutputs} >> $out
'';
in
{
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
wayland = {
enable = true;
compositorCommand = "${lib.getExe pkgs.weston} --shell=kiosk -c ${westonConfig}";
};
package = pkgs.kdePackages.sddm;
theme = "sddm-astronaut-theme";
extraPackages = [ sddmTheme ];
};
environment.systemPackages = [ sddmTheme ];
}
+1
View File
@@ -11,6 +11,7 @@
};
environment.systemPackages = with pkgs; [
egl-wayland
libva-utils
nvidia-vaapi-driver
nvtopPackages.nvidia
+1
View File
@@ -10,6 +10,7 @@
enableVirtualCamera = true;
plugins = with pkgs.obs-studio-plugins; [
wlrobs
obs-pipewire-audio-capture
];
};