54 lines
1.1 KiB
Nix
54 lines
1.1 KiB
Nix
{ pkgs, ... }:
|
|
{
|
|
imports = [
|
|
./ppp.pm-site.nix
|
|
./whib-backend.nix
|
|
./whib-frontend.nix
|
|
];
|
|
|
|
config = {
|
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
|
|
|
networking.hostName = "test-vm";
|
|
|
|
mod = {
|
|
pppdotpm-site.enable = false;
|
|
whib-backend.enable = true;
|
|
whib-frontend.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 the *first* time with `build-vm`
|
|
virtualisation = {
|
|
diskSize = 8192;
|
|
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";
|
|
};
|
|
}
|