{ config, pkgs, lib, modulesPath, ... }: # VirtualBox test image. Reuses services.nix but adds console/SSH login # credentials so you can actually get into the VM. Disk + bootloader are # provided by the virtualbox-image module, so hardware-configuration.nix # is intentionally NOT imported here. { imports = [ (modulesPath + "/virtualisation/virtualbox-image.nix") ./services.nix ]; # Allow password login for testing (real host is key-only). services.openssh.settings.PasswordAuthentication = lib.mkForce true; # Login: darman / test (change or remove for anything but local testing). users.users.darman.initialPassword = "test"; users.users.root.initialPassword = "test"; # Throwaway SMB password for testing (samba-smbd login = darman / test). # Single line — the provisioning oneshot feeds it twice for smbpasswd. # Real host must NOT do this — plaintext lands in the world-readable Nix # store. It uses sops-nix (secrets.nix) instead. environment.etc."samba/smb-password" = { text = "test\n"; mode = "0600"; }; # Guest additions for clipboard/resize (optional). virtualisation.virtualbox.guest.enable = true; # Smaller virtual disk = faster image assembly + VMDK compression. # Size in MiB (default is ~50G). virtualisation.diskSize = 6144; # 6 GiB total disk }