fix(vm): increase RAM to 8GB and fix Hyprland rule syntax to prevent crashes
- Increase VM memory to 8192MB to avoid OOM kills during session startup. - Migrate all 'windowrule' to 'windowrulev2' in core configuration. - Fix 'no_anim' syntax in layer rules. - Re-enable graphics while keeping serial logs for debugging.
This commit is contained in:
56
flake.nix
56
flake.nix
@@ -88,7 +88,7 @@
|
||||
virtualisation.memorySize = 2048;
|
||||
virtualisation.cores = 2;
|
||||
virtualisation.graphics = true;
|
||||
virtualisation.qemu.options = [ "-vga virtio" ];
|
||||
virtualisation.qemu.options = [ "-device virtio-vga" ];
|
||||
};
|
||||
|
||||
# Use a dummy hardware config for VM
|
||||
@@ -114,16 +114,52 @@
|
||||
./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 = 4096;
|
||||
virtualisation.memorySize = 8192;
|
||||
virtualisation.cores = 4;
|
||||
virtualisation.graphics = true;
|
||||
virtualisation.qemu.options = [ "-vga virtio" "-serial mon:stdio" ];
|
||||
virtualisation.qemu.options = [ "-device virtio-vga" "-serial mon:stdio" ];
|
||||
};
|
||||
|
||||
# Use a dummy hardware config for VM
|
||||
@@ -137,10 +173,18 @@
|
||||
# Setup default user for testing
|
||||
users.users.nomarchy = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "video" "render" ];
|
||||
extraGroups = [ "wheel" "video" "render" "networkmanager" ];
|
||||
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";
|
||||
|
||||
@@ -152,7 +196,7 @@
|
||||
home.homeDirectory = "/home/nomarchy";
|
||||
home.stateVersion = "25.11";
|
||||
};
|
||||
}
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user