Files
moonix/hosts/moonarch-vm/default.nix
T
nevaforget 06a0e68bea Emit a complete XML document in fonts.fontconfig.localConf
localConf is written to /etc/fonts/local.conf verbatim. Without the XML
declaration and the fontconfig root element, fontconfig rejects the file
with 'junk after document element' and the generic-family defaults never
take effect.
2026-08-07 14:47:36 +02:00

56 lines
1.8 KiB
Nix

# ABOUTME: Host configuration for the NixOS test VM running under QEMU/KVM.
# ABOUTME: Holds everything specific to the VM so the bare-metal host stays clean.
{ pkgs, ... }:
{
imports = [ ./hardware-configuration.nix ];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelParams = [ "quiet" ];
networking.hostName = "moonarch-vm";
networking.networkmanager.enable = true;
time.timeZone = "Europe/Berlin";
i18n.defaultLocale = "de_DE.UTF-8";
console.keyMap = "de";
users.users.kresdo = {
isNormalUser = true;
description = "Dominik Kressler";
extraGroups = [ "networkmanager" "wheel" "video" "input" ];
shell = pkgs.zsh;
};
# Development access from the host via the QEMU port forward on 127.0.0.1:2222.
services.openssh = {
enable = true;
settings.PasswordAuthentication = true;
};
# Throwaway test VM: passwordless sudo so the host can drive rebuilds and
# read logs over SSH. Deliberately confined to this host configuration —
# the bare-metal host must not inherit it.
security.sudo.wheelNeedsPassword = false;
# QEMU guest agent and clipboard/resolution integration.
services.qemuGuest.enable = true;
services.spice-vdagentd.enable = true;
# Render in software. Passing the guest through to the host GPU via
# virtio-gpu 3D triggered an amdgpu hard recovery on the host, killing the
# QEMU process. Slower, but it leaves the host graphics stack alone.
environment.variables.LIBGL_ALWAYS_SOFTWARE = "1";
# greetd starts niri directly, without a login shell, so the variable has to
# be set on the unit as well.
systemd.services.greetd.environment.LIBGL_ALWAYS_SOFTWARE = "1";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nixpkgs.config.allowUnfree = true;
system.stateVersion = "26.05";
}