feat(shoukei): x86 emulation via muvm+FEX, drop pkgs-x64 (#394)

* feat(shoukei): run x86/x86_64 apps and games via muvm+FEX

Apple Silicon's 16K pages mean FEX cannot run natively and qemu-user cannot
run complex x86_64 binaries. Wire the maintained rowanG077/nix-x86-on-aarch64
runtime (FEX inside a 4K muvm microVM) into shoukei so games, Steam, Wine and
other x86/x86_64 programs work, and let the module own the x86 ELF handlers
instead of qemu-user.

The input is pinned to our fork (ryan4yin/nix-x86-on-aarch64) at the reviewed
commit. Dropping boot.binfmt.emulatedSystems also removes x86_64 from
nix.settings.extra-platforms, so the qemu-user/uncached-x86-build gap is
recorded as WA-022.

- flake.nix: add nix-x86-on-aarch64 input (WA-021)
- hosts/12kingdoms-shoukei/game/: programs.x86-on-arm + steam/wine, 6 GiB VM
- hardware-configuration.nix: drop emulatedSystems/preferStaticEmulators
- apple-silicon.nix: drop the now-redundant box64
- docs: WA-012 resolved; WA-021 and WA-022 added; host README updated

* refactor(nixpkgs): drop the repo-wide pkgs-x64 package set

Every remaining pkgs-x64 consumer runs only on x86_64-linux hosts, where the
native pkgs already carries the same allowUnfree config
(modules/nixos/base/nix.nix) and overlays (modules/base/overlays.nix), so
replace the references with pkgs and drop the extra nixpkgs instantiation
(which also removes an eval on aarch64-darwin).

media.nix keeps the native Zoom app on x86_64 hosts only, since zoom-us has
no aarch64 Linux build.
This commit is contained in:
ryan4yin | 二花 authored and GitHub committed 2026-10-07 16:03:59 +08:00
commit 2af97e37b9
13 files changed
+125 -69

No files matched your search

+16 -15
View File
@@ -16,16 +16,17 @@ obsolete workarounds get rolled back instead of lingering.
A version or revision pinned for a reason that can go away. A version or revision pinned for a reason that can go away.
| ID | What & where | Why | Removal condition | Added | Revisit | Status | | ID | What & where | Why | Removal condition | Added | Revisit | Status |
| ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | ---------- | ---------------------- | ------ | | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ---------- | -------------------------- | ------ |
| WA-001 | smartctl_exporter pinned to upstream `6274decc`, which carries PR [#329](https://github.com/prometheus-community/smartctl_exporter/pull/329) — `overlays/smartctl-exporter/` | `/metrics` returns HTTP 500 once a device becomes readable after startup ([#305](https://github.com/prometheus-community/smartctl_exporter/issues/305), [#326](https://github.com/prometheus-community/smartctl_exporter/issues/326)) | Drop once nixpkgs provides a version containing the #329 fix | 2026-10-03 | next nixpkgs bump | active | | WA-001 | smartctl_exporter pinned to upstream `6274decc`, which carries PR [#329](https://github.com/prometheus-community/smartctl_exporter/pull/329) — `overlays/smartctl-exporter/` | `/metrics` returns HTTP 500 once a device becomes readable after startup ([#305](https://github.com/prometheus-community/smartctl_exporter/issues/305), [#326](https://github.com/prometheus-community/smartctl_exporter/issues/326)) | Drop once nixpkgs provides a version containing the #329 fix | 2026-10-03 | next nixpkgs bump | active |
| WA-002 | `nixpkgs-2505` — `flake.nix`; consumer `home/base/tui/container.nix` | `kubernetes-helm` regressed in newer nixpkgs | Drop the input and its consumer once helm works again in current nixpkgs | 2025-12-03 | when helm is revisited | active | | WA-002 | `nixpkgs-2505` — `flake.nix`; consumer `home/base/tui/container.nix` | `kubernetes-helm` regressed in newer nixpkgs | Drop the input and its consumer once helm works again in current nixpkgs | 2025-12-03 | when helm is revisited | active |
| WA-003 | `rust-overlay` follow — `flake.nix` | lanzaboote v1.1.0's pinned rust-overlay uses the deprecated `stdenv.isLinux`/`stdenv.isDarwin` | Drop the follow once lanzaboote updates its pin (or we drop the lanzaboote pin) | 2026-09-25 | on lanzaboote bump | active | | WA-003 | `rust-overlay` follow — `flake.nix` | lanzaboote v1.1.0's pinned rust-overlay uses the deprecated `stdenv.isLinux`/`stdenv.isDarwin` | Drop the follow once lanzaboote updates its pin (or we drop the lanzaboote pin) | 2026-09-25 | on lanzaboote bump | active |
| WA-004 | `catppuccin` on `main` — `flake.nix` | `main` carries the nodejs→nodejs-slim deprecation fix, which is not in a release | Switch to a release tag once it includes the fix | 2026-09-25 | on catppuccin release | active | | WA-004 | `catppuccin` on `main` — `flake.nix` | `main` carries the nodejs→nodejs-slim deprecation fix, which is not in a release | Switch to a release tag once it includes the fix | 2026-09-25 | on catppuccin release | active |
| WA-005 | `tuios` input — `flake.nix`; `home/base/tui/tuios/` | nixpkgs lags behind upstream | Use nixpkgs' `tuios` once it is recent enough | 2026-10-03 | on nixpkgs bump | active | | WA-005 | `tuios` input — `flake.nix`; `home/base/tui/tuios/` | nixpkgs lags behind upstream | Use nixpkgs' `tuios` once it is recent enough | 2026-10-03 | on nixpkgs bump | active |
| WA-006 | `nixpkgs-blender` — `flake.nix` | Blender 5.2 LTS + CUDA/OptiX pin; keeps `just up` from triggering a full source rebuild | Bump deliberately when needed; drop the pin if the current nixpkgs build is acceptable | 2026-07-24 | deliberate | active | | WA-006 | `nixpkgs-blender` — `flake.nix` | Blender 5.2 LTS + CUDA/OptiX pin; keeps `just up` from triggering a full source rebuild | Bump deliberately when needed; drop the pin if the current nixpkgs build is acceptable | 2026-07-24 | deliberate | active |
| WA-007 | WeChat from `nixpkgs-master` — `hardening/bwraps/default.nix` | newest builds; the pinned channel lags | Fall back to the stable channel once it has a good build | 2026-10-03 | on nixpkgs bump | active | | WA-007 | WeChat from `nixpkgs-master` — `hardening/bwraps/default.nix` | newest builds; the pinned channel lags | Fall back to the stable channel once it has a good build | 2026-10-03 | on nixpkgs bump | active |
| WA-020 | `fcitx5-vinput` pinned to release tag `v2.4.0` — `flake.nix`; consumer `home/linux/gui/base/vinput/default.nix` | Tracks a release tag instead of a branch, so `just up` stays on that release | Bump to a newer release tag when its changes are wanted | 2026-10-04 | on vinput release | active | | WA-020 | `fcitx5-vinput` pinned to release tag `v2.4.0` — `flake.nix`; consumer `home/linux/gui/base/vinput/default.nix` | Tracks a release tag instead of a branch, so `just up` stays on that release | Bump to a newer release tag when its changes are wanted | 2026-10-04 | on vinput release | active |
| WA-021 | `nix-x86-on-aarch64` input — our fork of rowanG077's patched FEX + muvm runtime — `flake.nix`; `hosts/12kingdoms-shoukei/game/` | FEX does not support 16K pages, so x86/x86_64 apps and games on shoukei need this pinned flake's 4K-page microVM runtime; our fork lets upstream changes be reviewed before use | Drop once FEX supports 16K pages directly, or nixpkgs/nixos-apple-silicon ships an equivalent runtime | 2026-10-07 | on FEX/nixpkgs/muvm update | active |
## Workarounds ## Workarounds
@@ -39,7 +40,7 @@ A setting that works around a bug or a hardware quirk.
| WA-011 | Kernel module blacklist (`esp4`, `esp6`, `rxrpc`) — `hardening/kernel-hardening.nix` | attack surface for the Dirty Frag LPE (CVE-2026-43284 / CVE-2026-43500) | Kept as defence in depth; drop only if something needs those modules | 2026-10-03 | rarely | active | | WA-011 | Kernel module blacklist (`esp4`, `esp6`, `rxrpc`) — `hardening/kernel-hardening.nix` | attack surface for the Dirty Frag LPE (CVE-2026-43284 / CVE-2026-43500) | Kept as defence in depth; drop only if something needs those modules | 2026-10-03 | rarely | active |
| WA-017 | keyd right-hand modifier passthrough — `modules/nixos/desktop/peripherals.nix` | keyd folds right Ctrl/Shift/Meta into their left keys | Drop once keyd or fcitx5 keeps right-hand modifiers distinct | 2026-10-05 | on keyd bump | active | | WA-017 | keyd right-hand modifier passthrough — `modules/nixos/desktop/peripherals.nix` | keyd folds right Ctrl/Shift/Meta into their left keys | Drop once keyd or fcitx5 keeps right-hand modifiers distinct | 2026-10-05 | on keyd bump | active |
| WA-018 | user-owned `~/.ssh/config` + disabled systemd ssh-proxy include — `home/base/tui/ssh.nix`, `modules/nixos/base/ssh.nix` | bwrap exposes root-owned store files as `nobody` | Drop once sandboxes preserve store ownership | 2026-10-06 | when sandbox layout changes | active | | WA-018 | user-owned `~/.ssh/config` + disabled systemd ssh-proxy include — `home/base/tui/ssh.nix`, `modules/nixos/base/ssh.nix` | bwrap exposes root-owned store files as `nobody` | Drop once sandboxes preserve store ownership | 2026-10-06 | when sandbox layout changes | active |
| WA-019 | programs.steam.extraCompatPackages = [ pkgs-x64.dwproton-bin pkgs-x64.proton-ge-bin ] — modules/nixos/desktop/gaming.nix | ACE games fail on GE/mainline Proton, work with DW-Proton | Drop once mainline or GE-Proton runs these games (GE-Proton#433) | 2026-10-07 | on Proton/GE bump | active | | WA-019 | programs.steam.extraCompatPackages = [ pkgs.dwproton-bin pkgs.proton-ge-bin ] — modules/nixos/desktop/gaming.nix | ACE games fail on GE/mainline Proton, work with DW-Proton | Drop once mainline or GE-Proton runs these games (GE-Proton#433) | 2026-10-07 | on Proton/GE bump | active |
If WA-008 freezes recur, the fallback is to restore If WA-008 freezes recur, the fallback is to restore
`nvme_core.default_ps_max_latency_us=0 nvme_core.io_timeout=4294967295 pcie_aspm=off`; this is a `nvme_core.default_ps_max_latency_us=0 nvme_core.io_timeout=4294967295 pcie_aspm=off`; this is a
@@ -49,10 +50,10 @@ recovery procedure, not its removal condition.
A known limitation with no fix yet. A known limitation with no fix yet.
| ID | What & where | Why | Removal condition | Added | Revisit | Status | | ID | What & where | Why | Removal condition | Added | Revisit | Status |
| ------ | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | ---------- | -------------------------------------- | ------ | | ------ | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ---------- | -------------------------------------------------------------- | ------ |
| WA-012 | `muvm` (x86_64 apps/games via microVM) disabled — `hosts/12kingdoms-shoukei/apple-silicon.nix` | Apple Silicon's 16k page size means x86_64 apps need `muvm`; it is off because it does not build/run on nixos-apple-silicon yet ([nixos-apple-silicon#237](https://github.com/nix-community/nixos-apple-silicon/issues/237)) | Re-enable once `muvm` builds and works | — | on nixos-apple-silicon or muvm updates | active | | WA-016 | subscription rule snapshots — `modules/nixos/desktop/networking/mihomo/` (`rules_from:`) | mihomo's `proxy-providers` imports proxies only, so the `rules` and `proxy-groups` a subscription ships with are dropped by the core; the generator re-imports them from a local YAML copy that has to be refreshed by hand when the provider changes its routing policy | Drop the snapshots once mihomo can import rules from a proxy-provider, or the providers publish their rules as rule-providers | 2026-10-04 | when mihomo gains rule import | active |
| WA-016 | subscription rule snapshots — `modules/nixos/desktop/networking/mihomo/` (`rules_from:`) | mihomo's `proxy-providers` imports proxies only, so the `rules` and `proxy-groups` a subscription ships with are dropped by the core; the generator re-imports them from a local YAML copy that has to be refreshed by hand when the provider changes its routing policy | Drop the snapshots once mihomo can import rules from a proxy-provider, or the providers publish their rules as rule-providers | 2026-10-04 | when mihomo gains rule import | active | | WA-022 | qemu-user binfmt removed — `hosts/12kingdoms-shoukei/hardware-configuration.nix` | the x86-on-arm module owns the x86 ELF handlers and this host does not need riscv64, but dropping `boot.binfmt.emulatedSystems` also drops `nix.settings.extra-platforms` and qemu-user, so `podman run --platform=linux/amd64`, x86 chroots and local builds of uncached x86 derivations need a remote x86_64 builder | Restore `boot.binfmt.emulatedSystems` (without x86_64/i686, which the module asserts against) if such a workload is needed | 2026-10-07 | when an amd64 container/chroot or uncached x86 build is needed | active |
## WIP ## WIP
Generated
+22
View File
@@ -732,6 +732,27 @@
"type": "github" "type": "github"
} }
}, },
"nix-x86-on-aarch64": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1790210091,
"narHash": "sha256-ZM9kDVJNjFHVHR1Osx+6SdG2Lufnfx2Ek0Wcxc3KX00=",
"owner": "ryan4yin",
"repo": "nix-x86-on-aarch64",
"rev": "5d69793a1c8b31d724fccd9b6acaa33587c923b3",
"type": "github"
},
"original": {
"owner": "ryan4yin",
"repo": "nix-x86-on-aarch64",
"rev": "5d69793a1c8b31d724fccd9b6acaa33587c923b3",
"type": "github"
}
},
"nixos-apple-silicon": { "nixos-apple-silicon": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_4", "flake-compat": "flake-compat_4",
@@ -1050,6 +1071,7 @@
"mysecrets": "mysecrets", "mysecrets": "mysecrets",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
"nix-gaming": "nix-gaming", "nix-gaming": "nix-gaming",
"nix-x86-on-aarch64": "nix-x86-on-aarch64",
"nixos-apple-silicon": "nixos-apple-silicon", "nixos-apple-silicon": "nixos-apple-silicon",
"nixpak": "nixpak", "nixpak": "nixpak",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
+14
View File
@@ -152,6 +152,20 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# x86/x86_64 emulation on 16K-page ARM64 (Apple Silicon). FEX cannot run
# natively with 16K pages, so this wraps FEX in a 4K-page muvm microVM and
# exposes an `x86pkgs` set plus Steam/Wine launchers. Used by shoukei; see
# hosts/12kingdoms-shoukei and WORKAROUNDS.md (WA-021).
#
# Pinned to our fork of rowanG077/nix-x86-on-aarch64 at the reviewed commit
# 5d69793a. To update, fetch upstream into the fork, review the new commits,
# then bump the rev here deliberately. Do not track the fork's default branch:
# a GitHub "Sync fork" fast-forward would pull unreviewed changes.
nix-x86-on-aarch64 = {
url = "github:ryan4yin/nix-x86-on-aarch64/5d69793a1c8b31d724fccd9b6acaa33587c923b3";
inputs.nixpkgs.follows = "nixpkgs";
};
######################## Some non-flake repositories ######################################### ######################## Some non-flake repositories #########################################
nu_scripts = { nu_scripts = {
+6 -7
View File
@@ -1,6 +1,5 @@
{ {
pkgs, pkgs,
pkgs-x64,
osConfig, osConfig,
config, config,
lib, lib,
@@ -44,12 +43,12 @@ in
# required by some games to fix problems # required by some games to fix problems
bbe bbe
]) ])
++ (with pkgs-x64; [ ++ (with pkgs; [
# Heroic Games Launcher - primarily for Epic Games & GOG # Heroic Games Launcher - primarily for Epic Games & GOG
# https://heroicgameslauncher.com/ # https://heroicgameslauncher.com/
(heroic.override { (heroic.override {
extraPkgs = _pkgs: [ extraPkgs = _pkgs: [
pkgs.gamescope # aarch64 pkgs.gamescope
]; ];
}) })
]); ]);
@@ -60,13 +59,13 @@ in
# https://lutris.net/games?ordering=-popularity # https://lutris.net/games?ordering=-popularity
programs.lutris = { programs.lutris = {
enable = true; enable = true;
defaultWinePackage = pkgs-x64.proton-ge-bin; defaultWinePackage = pkgs.proton-ge-bin;
steamPackage = osConfig.programs.steam.package; steamPackage = osConfig.programs.steam.package;
protonPackages = [ pkgs-x64.proton-ge-bin ]; protonPackages = [ pkgs.proton-ge-bin ];
winePackages = with pkgs-x64; [ winePackages = with pkgs; [
wineWow64Packages.full wineWow64Packages.full
]; ];
extraPackages = with pkgs-x64; [ extraPackages = with pkgs; [
winetricks winetricks
gamescope gamescope
gamemode gamemode
+20 -17
View File
@@ -1,29 +1,32 @@
{ {
pkgs, pkgs,
pkgs-x64, lib,
... ...
}: }:
# media - control and enjoy audio/video # media - control and enjoy audio/video
{ {
home.packages = with pkgs; [ home.packages =
# audio control with pkgs;
pavucontrol [
playerctl # audio control
pulsemixer pavucontrol
imv # simple image viewer playerctl
pulsemixer
imv # simple image viewer
# music # music
go-musicfox # TUI NetEase Cloud Music client; plays through mpv (configured below) go-musicfox # TUI NetEase Cloud Music client; plays through mpv (configured below)
# video/audio tools # video/audio tools
libva-utils libva-utils
vdpauinfo vdpauinfo
vulkan-tools vulkan-tools
mesa-demos mesa-demos
nvitop nvitop
]
# Zoom: Settings > Share Screen > Advanced > Screen Capture Mode on Wayland > PipeWire Mode. # Zoom: Settings > Share Screen > Advanced > Screen Capture Mode on Wayland > PipeWire Mode.
(pkgs-x64.zoom-us) # zoom-us ships only an x86_64 Linux client, so the aarch64 host skips it.
]; ++ lib.optionals pkgs.stdenv.hostPlatform.isx86_64 [ pkgs.zoom-us ];
programs.mpv = { programs.mpv = {
enable = true; enable = true;
+4 -5
View File
@@ -1,6 +1,5 @@
{ {
pkgs, pkgs,
pkgs-x64,
config, config,
lib, lib,
... ...
@@ -58,7 +57,7 @@ let
${lib.optionalString cfg.cuaDriver '' ${lib.optionalString cfg.cuaDriver ''
# cua-driver sends content-free telemetry by default; turn it off. # cua-driver sends content-free telemetry by default; turn it off.
${pkgs-x64.cua-driver}/bin/cua-driver telemetry disable >/dev/null 2>&1 || true ${pkgs.cua-driver}/bin/cua-driver telemetry disable >/dev/null 2>&1 || true
''} ''}
''; '';
in in
@@ -84,10 +83,10 @@ in
] ]
++ [ ++ [
# MCP server / CLI that drives the desktop (see overlays/computer-use-linux.nix). # MCP server / CLI that drives the desktop (see overlays/computer-use-linux.nix).
pkgs-x64.computer-use-linux pkgs.computer-use-linux
] ]
++ lib.optional cfg.vnc pkgs.x11vnc ++ lib.optional cfg.vnc pkgs.x11vnc
++ lib.optional cfg.cuaDriver pkgs-x64.cua-driver; ++ lib.optional cfg.cuaDriver pkgs.cua-driver;
# Headless X server. # Headless X server.
systemd.user.services.xvfb = { systemd.user.services.xvfb = {
@@ -202,7 +201,7 @@ in
"DISPLAY=${display}" "DISPLAY=${display}"
"XDG_SESSION_TYPE=x11" "XDG_SESSION_TYPE=x11"
]; ];
ExecStart = "${pkgs-x64.cua-driver}/bin/cua-driver serve"; ExecStart = "${pkgs.cua-driver}/bin/cua-driver serve";
Restart = "always"; Restart = "always";
RestartSec = 2; RestartSec = 2;
}; };
+19
View File
@@ -5,6 +5,25 @@ This is NixOS's configuration for my Macbook Pro 2022 M2, 16G RAM.
This laptop joins untrusted networks and uses DHCP instead of a static IP, so it has no entry in This laptop joins untrusted networks and uses DHCP instead of a static IP, so it has no entry in
`vars/networking.nix`. `vars/networking.nix`.
## x86/x86_64 applications
The M2 uses 16 KiB pages, and FEX does not emulate 4 KiB guest pages, so x86/x86_64 binaries cannot
run directly on this kernel. [`game/`](./game/default.nix) enables `programs.x86-on-arm` from
[our fork](https://github.com/ryan4yin/nix-x86-on-aarch64) of
[rowanG077/nix-x86-on-aarch64](https://github.com/rowanG077/nix-x86-on-aarch64), which runs FEX
inside a 4 KiB `muvm` microVM and registers both ELF handlers:
- run an x86/x86_64 ELF directly, or use `x86-arm run <program>`;
- `nix-shell -p x86pkgs.hello --run hello` for the x86 package set;
- `steam` and `x86-arm-wine` for games and Windows programs.
The microVM is capped at 6 GiB (`memoryMiB`) on this 16 GiB machine, and needs `/dev/kvm` plus a
running systemd user session. See [WORKAROUNDS.md](../../WORKAROUNDS.md) WA-021.
Because the host no longer registers qemu-user binfmt, `podman run --platform=linux/amd64`, x86
chroots, and local builds of uncached x86 derivations need a remote x86_64 builder (see
[WORKAROUNDS.md](../../WORKAROUNDS.md) WA-022).
Related: Related:
- [M2 Series Feature Support - Asahi Linux](https://asahilinux.org/docs/platform/feature-support/m2/) - [M2 Series Feature Support - Asahi Linux](https://asahilinux.org/docs/platform/feature-support/m2/)
@@ -26,10 +26,6 @@
]; ];
}; };
environment.systemPackages = with pkgs; [
box64 # Linux Userspace x86 and x86_64 Emulator, run x86_64 apps(such as games, gui apps) on aarch64.
];
# configures the network interface(include wireless) via `nmcli` & `nmtui` # configures the network interface(include wireless) via `nmcli` & `nmtui`
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
+1
View File
@@ -14,6 +14,7 @@ in
{ {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./game
# shoukei reuses ai's preservation layout; no host-specific overrides yet # shoukei reuses ai's preservation layout; no host-specific overrides yet
../idols-ai/preservation.nix ../idols-ai/preservation.nix
]; ];
+17
View File
@@ -0,0 +1,17 @@
# x86/x86_64 applications and games on this Apple Silicon host.
#
# FEX cannot run on the 16K pages this machine boots with, so
# nix-x86-on-aarch64 runs FEX inside a 4K-page muvm microVM and owns the
# x86_64/i686 ELF handlers. Pinned to our fork; see WORKAROUNDS.md WA-021.
{ nix-x86-on-aarch64, ... }:
{
imports = [ nix-x86-on-aarch64.nixosModules.default ];
programs.x86-on-arm = {
enable = true;
steam.enable = true;
wine.enable = true;
# 16 GiB machine: cap what the guest may demand instead of muvm's 80% default.
memoryMiB = 6144;
};
}
@@ -23,14 +23,9 @@ in
# depending on how you configured your disk mounts, change this to /boot or /boot/efi. # depending on how you configured your disk mounts, change this to /boot or /boot/efi.
boot.loader.efi.efiSysMountPoint = "/boot"; boot.loader.efi.efiSysMountPoint = "/boot";
# Enable binfmt emulation of aarch64-linux, this is required for cross compilation. # Foreign-architecture emulation is not used on this host: x86/x86_64 programs
boot.binfmt.emulatedSystems = [ # run through `./game` (FEX inside a muvm microVM), which owns the x86_64/i686
"x86_64-linux" # ELF handlers, and qemu-user cannot run them on 16K pages anyway.
"riscv64-linux"
];
# This enables the kernel to preload the emulator binaries when the binfmt registrations are added,
# obviating the need to make the emulator binaries available inside chroots and chroot-like sandboxes.
boot.binfmt.preferStaticEmulators = true; # required to work with podman
nixpkgs.overlays = [ nixpkgs.overlays = [
(final: previous: { (final: previous: {
# https://github.com/NixOS/nixpkgs/issues/392673 # https://github.com/NixOS/nixpkgs/issues/392673
+3 -4
View File
@@ -1,6 +1,5 @@
{ {
pkgs, pkgs,
pkgs-x64,
nix-gaming, nix-gaming,
config, config,
lib, lib,
@@ -39,7 +38,7 @@ in
# ~/.steam/root - A symlink to ~/.local/share/Steam # ~/.steam/root - A symlink to ~/.local/share/Steam
# ~/.steam - Some Symlinks & user info # ~/.steam - Some Symlinks & user info
enable = true; enable = true;
package = pkgs-x64.steam; package = pkgs.steam;
# https://github.com/Winetricks/winetricks # https://github.com/Winetricks/winetricks
# Whether to enable protontricks, a simple wrapper for running Winetricks commands for Proton-enabled games. # Whether to enable protontricks, a simple wrapper for running Winetricks commands for Proton-enabled games.
protontricks.enable = true; protontricks.enable = true;
@@ -55,8 +54,8 @@ in
# each game's Properties -> Compatibility. # each game's Properties -> Compatibility.
# https://dawn.wine/dawn-winery/dwproton # https://dawn.wine/dawn-winery/dwproton
extraCompatPackages = [ extraCompatPackages = [
pkgs-x64.dwproton-bin pkgs.dwproton-bin
pkgs-x64.proton-ge-bin pkgs.proton-ge-bin
]; ];
}; };
-9
View File
@@ -56,15 +56,6 @@ let
cudaCapabilities = [ "8.9" ]; cudaCapabilities = [ "8.9" ];
}; };
}; };
pkgs-x64 = import nixpkgs {
system = "x86_64-linux";
# To use chrome, we need to allow the installation of non-free software
config.allowUnfree = true;
overlays = import ../overlays args;
};
}; };
# This is the args for all the haumea modules in this folder. # This is the args for all the haumea modules in this folder.