make vm architecture agnostic

This commit is contained in:
Sean Kovacs 2026-01-06 11:03:26 -05:00
commit f6dbc88abb
Signed by: sckova
GPG key ID: 00F325187C68651A
7 changed files with 103 additions and 88 deletions

View file

@ -0,0 +1,40 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
lib,
pkgs,
system,
...
}: {
imports = [];
boot.initrd.availableKernelModules = ["ehci_pci" "xhci_pci" "usbhid" "sr_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = [];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/boot";
fsType = "vfat";
options = ["fmask=0077" "dmask=0077"];
};
swapDevices = [
{device = "/dev/disk/by-label/swap";}
];
# Set platform from the system argument passed by the flake
nixpkgs.hostPlatform = lib.mkDefault system;
# Enable Parallels tools only on aarch64
hardware.parallels.enable = lib.mkIf (system == "aarch64-linux") true;
nixpkgs.config.allowUnfreePredicate =
lib.mkIf (system == "aarch64-linux")
(pkg: builtins.elem (lib.getName pkg) ["prl-tools"]);
}