move wsl binfmt configuration to host

apparently a mkIf can't contain a nonexistent option even if it's never
gonna be evaluated?
This commit is contained in:
NullBite 2024-03-15 01:18:21 -04:00
parent 1f8dbf6c32
commit 4e8b112976
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A
2 changed files with 1 additions and 5 deletions

View File

@ -7,6 +7,7 @@
profile.base.enable = true;
binfmt.enable = true;
};
wsl.interop.register = true;
networking.networkmanager.enable = false;
programs.gnupg.agent = {

View File

@ -33,10 +33,5 @@ in
(lib.mkIf enable {
boot.binfmt = {inherit emulatedSystems;};
})
# keep Windows binfmt registration on wsl
(lib.mkIf (cfg.enable && lib.hasAttrByPath [ "wsl" "interop" "register" ] options) {
wsl.interop.register = lib.mkDefault true;
})
];
}