fix(vm): fix Plymouth theme path and optimize VM graphics for splash screen
This commit is contained in:
@@ -88,12 +88,14 @@
|
|||||||
virtualisation.memorySize = 2048;
|
virtualisation.memorySize = 2048;
|
||||||
virtualisation.cores = 2;
|
virtualisation.cores = 2;
|
||||||
virtualisation.graphics = true;
|
virtualisation.graphics = true;
|
||||||
|
virtualisation.qemu.options = [ "-vga virtio" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Use a dummy hardware config for VM
|
# Use a dummy hardware config for VM
|
||||||
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
|
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
|
||||||
boot.loader.grub.device = "/dev/vda";
|
boot.loader.grub.device = "/dev/vda";
|
||||||
boot.initrd.kernelModules = [ "virtio_gpu" ];
|
boot.initrd.kernelModules = [ "virtio_gpu" ];
|
||||||
|
boot.kernelParams = [ "video=1280x800" ];
|
||||||
|
|
||||||
# Ensure the user has the right groups for graphical environment
|
# Ensure the user has the right groups for graphical environment
|
||||||
users.users.nixos = {
|
users.users.nixos = {
|
||||||
@@ -121,12 +123,14 @@
|
|||||||
virtualisation.memorySize = 2048;
|
virtualisation.memorySize = 2048;
|
||||||
virtualisation.cores = 2;
|
virtualisation.cores = 2;
|
||||||
virtualisation.graphics = true;
|
virtualisation.graphics = true;
|
||||||
|
virtualisation.qemu.options = [ "-vga virtio" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Use a dummy hardware config for VM
|
# Use a dummy hardware config for VM
|
||||||
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
|
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
|
||||||
boot.loader.grub.device = "/dev/vda";
|
boot.loader.grub.device = "/dev/vda";
|
||||||
boot.initrd.kernelModules = [ "virtio_gpu" ];
|
boot.initrd.kernelModules = [ "virtio_gpu" ];
|
||||||
|
boot.kernelParams = [ "video=1280x800" ];
|
||||||
|
|
||||||
# Setup default user for testing
|
# Setup default user for testing
|
||||||
users.users.nomarchy = {
|
users.users.nomarchy = {
|
||||||
|
|||||||
@@ -10,9 +10,8 @@ let
|
|||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/share/plymouth/themes/nomarchy
|
mkdir -p $out/share/plymouth/themes/nomarchy
|
||||||
cp * $out/share/plymouth/themes/nomarchy/
|
cp * $out/share/plymouth/themes/nomarchy/
|
||||||
# Fix path in the plymouth file to point to the nix store if needed,
|
# Fix path in the plymouth file to point to the nix store
|
||||||
# but usually Plymouth looks in its theme dir.
|
sed -i "s|/[a-z]*/share/plymouth/themes/nomarchy|$out/share/plymouth/themes/nomarchy|g" $out/share/plymouth/themes/nomarchy/nomarchy.plymouth
|
||||||
sed -i "s|/etc/plymouth/themes/nomarchy|$out/share/plymouth/themes/nomarchy|g" $out/share/plymouth/themes/nomarchy/nomarchy.plymouth
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|||||||
Reference in New Issue
Block a user