44 lines
1 KiB
Nix
44 lines
1 KiB
Nix
{ hostname, machineConfig, ... }: {
|
|
imports = [
|
|
./modules/custom-build-vm.nix
|
|
./modules/custom-sops-nix.nix
|
|
./modules/my-users.nix
|
|
./modules/sddm.nix
|
|
./modules/unfree.nix
|
|
];
|
|
|
|
config = {
|
|
system.stateVersion = "23.11";
|
|
|
|
# Map host keys into VM and launch vm using `virt-viewer`
|
|
virtualisation =
|
|
let
|
|
vmConfig = {
|
|
virtualisation = {
|
|
sharedHostKeys = true;
|
|
usb-redirect = true;
|
|
virt-viewer = true;
|
|
cores = 4;
|
|
memorySize = 4 * 1024;
|
|
};
|
|
};
|
|
in {
|
|
vmVariant = vmConfig;
|
|
vmVariantWithBootLoader = vmConfig;
|
|
};
|
|
|
|
users.myUsers = machineConfig.users;
|
|
|
|
# Networking
|
|
networking.hostName = hostname;
|
|
|
|
# Set time zone
|
|
time.timeZone = machineConfig.timeZone;
|
|
|
|
# Configure keyboard layout
|
|
console.keyMap = machineConfig.keyMap;
|
|
services.xserver.xkb.layout = machineConfig.keyboardLayout;
|
|
|
|
i18n.extraLocaleSettings = machineConfig.localeSettings;
|
|
};
|
|
}
|