Compare commits

..

No commits in common. "8e3ce585512efc1c9f9a74d79918fef2c3fc1d5f" and "00eb9d49b3a8d5fc1c89fe4515348f271b9db9a2" have entirely different histories.

3 changed files with 0 additions and 41 deletions

View File

@ -1,35 +0,0 @@
{ pkgs, config, lib, ... }:
let
configForSystem = (system:
let
riscv = [ "riscv32-linux" "riscv64-linux" ];
arm = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" ];
x86 = [ "i686-linux" "x86_64-linux" ];
windows = [ "x86_64-windows" "i686-windows" ];
systems = {
x86_64-linux = riscv ++ arm ++ windows;
aarch64-linux = riscv;
};
in
if (systems ? "${system}") then systems."${system}" else []
);
emulatedSystems = configForSystem "${pkgs.system}";
cfg = config.nixfiles.binfmt;
in
{
options.nixfiles.binfmt = {
enable = lib.mkOption {
description = "Whether to configure default binfmt emulated systems for the current architecture";
type = lib.types.bool;
default = false;
example = true;
};
};
config = lib.mkMerge [
(lib.mkIf (cfg.enable && (builtins.length emulatedSystems) > 0) {
boot.binfmt = {inherit emulatedSystems;};
})
];
}

View File

@ -5,6 +5,5 @@
./nvidia.nix ./nvidia.nix
./opengl.nix ./opengl.nix
./sound.nix ./sound.nix
./binfmt.nix
]; ];
} }

View File

@ -17,7 +17,6 @@ in
# Enable system Nix configuration # Enable system Nix configuration
nix.enable = lib.mkDefault true; nix.enable = lib.mkDefault true;
}; };
nixfiles.binfmt.enable = true;
# locale settings # locale settings
i18n = { i18n = {
@ -71,7 +70,6 @@ in
htop htop
lshw lshw
pciutils pciutils
compsize
# nix utilities # nix utilities
nix-du nix-du
@ -81,9 +79,6 @@ in
age age
pass pass
sops sops
# etc
neofetch
]; ];
programs.neovim.defaultEditor = lib.mkDefault true; programs.neovim.defaultEditor = lib.mkDefault true;