Commit 6c01e46
Changed files (2)
modules
develop
roles
modules/develop/binfmt.nix
@@ -0,0 +1,21 @@
+{
+ den,
+ lib,
+ ...
+}: {
+ den.aspects.develop.binfmt = {
+ nixos = {
+ host,
+ config,
+ ...
+ }: let
+ currentHostSystem = host.system;
+ allHostSystems = lib.filter (sys: lib.hasSuffix "linux" sys) (lib.attrNames den.hosts);
+ emulatedSystems = lib.filter (sys: sys != currentHostSystem) allHostSystems;
+
+ notVM = config.hardware.facter.report.virtualisation == "none";
+ in {
+ boot.binfmt.emulatedSystems = lib.optionals notVM emulatedSystems;
+ };
+ };
+}
modules/roles/develop.nix
@@ -1,6 +1,7 @@
{den, ...}: {
den.aspects.roles.develop = {
includes = with den.aspects; [
+ develop.binfmt
develop.direnv
];
};