Files
nixos-configs/hosts/test-vm/configuration.nix
2025-01-03 11:20:31 +01:00

52 lines
1.0 KiB
Nix

{ pkgs, ... }:
{
imports = [
./ppp.pm-site.nix
./whib-backend.nix
];
config = {
boot.kernelPackages = pkgs.linuxPackages_latest;
networking.hostName = "test-vm";
mod = {
pppdotpm-site.enable = false;
whib-backend.enable = true;
};
users.users.a = {
isNormalUser = true;
extraGroups = [ "wheel" ];
password = "a";
};
services.getty.autologinUser = "a";
security.sudo.wheelNeedsPassword = false;
virtualisation.vmVariant = {
# following configuration is added only when building VM with build-vm
virtualisation = {
diskSize = 4096;
memorySize = 2048;
cores = 3;
graphics = false;
};
};
# Resize terminal to host terminal size
environment.loginShellInit = ''
${pkgs.xterm}/bin/resize
echo alias 'sd' can be used to shutdown the VM
'';
environment.interactiveShellInit = ''
alias sd='sudo shutdown now'
'';
environment.systemPackages = [ ];
system.stateVersion = "24.05";
};
}