fix(system): finalize VM stabilization and fix Hyprland syntax

- Restore custom SDDM theme.
- Clean up all remaining Hyprland windowrulev2 and layerrule syntax errors.
- Optimize VM configurations with 4GB RAM and virtio-vga graphics for stability.
- Remove diagnostic debug services and autologin debug settings.
- Ensure correct session autologin to hyprland-uwsm.
This commit is contained in:
Bernardo Magri
2026-04-05 14:58:33 +01:00
parent c336f528a8
commit bb6b46b76e
7 changed files with 11 additions and 58 deletions

View File

@@ -114,61 +114,23 @@
./modules/system
./modules/system/hardware.nix
home-manager.nixosModules.home-manager
({ pkgs, ... }: {
{
system.stateVersion = "25.11";
networking.hostName = "nomarchy";
home-manager.extraSpecialArgs = { inherit inputs; };
# Diagnostic service to debug the black screen inside the VM
systemd.services.nomarchy-diag = {
description = "Nomarchy VM Diagnostics";
wantedBy = [ "multi-user.target" ];
after = [ "display-manager.service" ];
serviceConfig = {
Type = "oneshot";
StandardOutput = "tty";
StandardError = "tty";
TTYPath = "/dev/ttyS0";
ExecStart = pkgs.writeScript "diag.sh" ''
#!${pkgs.bash}/bin/bash
echo "--- NOMARCHY VM DIAGNOSTICS START ---"
echo "SDDM Helper Logs:"
${pkgs.systemd}/bin/journalctl -t sddm-helper --no-pager -n 50
echo "User (nomarchy) Environment:"
${pkgs.sudo}/bin/sudo -u nomarchy env | grep -E "XDG|DISPLAY|WAYLAND"
echo "User (nomarchy) Systemd Status:"
${pkgs.sudo}/bin/sudo -u nomarchy ${pkgs.systemd}/bin/systemctl --user status || echo "User systemd not running"
echo "User (nomarchy) Journal Logs:"
${pkgs.sudo}/bin/sudo -u nomarchy ${pkgs.systemd}/bin/journalctl --user --no-pager -n 100
echo "Hyprland Binary Check:"
ls -l /run/current-system/sw/bin/Hyprland || echo "Hyprland binary NOT FOUND in sw/bin"
echo "Hyprland Crash Dumps:"
${pkgs.coreutils}/bin/ls -l /home/nomarchy/.cache/hyprland/ || echo "No crash dumps found"
echo "--- NOMARCHY VM DIAGNOSTICS END ---"
'';
};
};
# VM specific settings
virtualisation.vmVariant = {
virtualisation.memorySize = 8192;
virtualisation.cores = 4;
virtualisation.memorySize = 4096;
virtualisation.cores = 2;
virtualisation.graphics = true;
virtualisation.qemu.options = [ "-device virtio-vga" "-serial mon:stdio" ];
virtualisation.qemu.options = [ "-device virtio-vga" ];
};
# Use a dummy hardware config for VM
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
boot.loader.grub.device = "/dev/vda";
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_blk" "virtio_gpu" "virtio_net" "virtio_mmio" ];
boot.kernelParams = nixpkgs.lib.mkForce [ "video=1280x800" "quiet" "splash" "boot.shell_on_fail" "console=ttyS0" "console=tty1" ];
services.qemuGuest.enable = true;
boot.kernelParams = nixpkgs.lib.mkForce [ "video=1280x800" "quiet" "splash" "boot.shell_on_fail" ];
# Setup default user for testing
users.users.nomarchy = {
@@ -177,14 +139,6 @@
initialPassword = "nixos";
};
environment.systemPackages = [ pkgs.sudo ];
# Enable passwordless sudo for the test user
security.sudo.wheelNeedsPassword = false;
# Autologin on the serial console for debugging
services.getty.autologinUser = "nomarchy";
services.displayManager.autoLogin.enable = true;
services.displayManager.autoLogin.user = "nomarchy";
@@ -196,7 +150,7 @@
home.homeDirectory = "/home/nomarchy";
home.stateVersion = "25.11";
};
})
}
];
};
};