From 44ab95d846aff41df3ec28effe114bb035a03e2f Mon Sep 17 00:00:00 2001 From: Jordan Holt Date: Sat, 26 Jul 2025 17:02:59 +0100 Subject: [PATCH] hosts/artemis: add wine binfmt --- hosts/artemis/default.nix | 6 ++++++ hosts/artemis/hardware-configuration.nix | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/hosts/artemis/default.nix b/hosts/artemis/default.nix index d757645..d8d629a 100644 --- a/hosts/artemis/default.nix +++ b/hosts/artemis/default.nix @@ -7,6 +7,7 @@ let inherit (lib) + getExe mkForce ; in @@ -63,6 +64,11 @@ in capSysAdmin = true; }; + environment = { + systemPackages = [ pkgs.wine ]; + sessionVariables.WINE_BIN = getExe pkgs.wine; + }; + modules = { services = { borgmatic = { diff --git a/hosts/artemis/hardware-configuration.nix b/hosts/artemis/hardware-configuration.nix index cc5ab16..174a697 100644 --- a/hosts/artemis/hardware-configuration.nix +++ b/hosts/artemis/hardware-configuration.nix @@ -8,6 +8,7 @@ let inherit (lib) + getExe mkDefault mkOverride ; @@ -19,6 +20,13 @@ in # Inspired by: https://github.com/Jovian-Experiments/Jovian-NixOS boot = { + binfmt.registrations."DOSWin" = { + wrapInterpreterInShell = false; + interpreter = getExe pkgs.wine; + recognitionType = "magic"; + offset = 0; + magicOrExtension = "MZ"; + }; initrd = { availableKernelModules = [ "xhci_pci"