add qemu-user
This commit is contained in:
parent
5e1f7f5479
commit
24e276fdc8
|
@ -5,6 +5,7 @@
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
deploy-rs.url = "github:serokell/deploy-rs";
|
deploy-rs.url = "github:serokell/deploy-rs";
|
||||||
|
#mobile-nixos.url = "github:NixOS/mobile-nixos";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { ... }@inputs: import ./outputs.nix inputs;
|
outputs = { ... }@inputs: import ./outputs.nix inputs;
|
||||||
|
|
|
@ -12,7 +12,10 @@
|
||||||
profiles.sway
|
profiles.sway
|
||||||
profiles.dnscrypt
|
profiles.dnscrypt
|
||||||
profiles.gaming
|
profiles.gaming
|
||||||
# For sci-hub and whenever websites break
|
# so i can build nixos mobile
|
||||||
|
profiles.qemu_user
|
||||||
|
|
||||||
|
# for sci-hub and whenever websites break
|
||||||
# profiles.tor
|
# profiles.tor
|
||||||
# profiles.sshd
|
# profiles.sshd
|
||||||
];
|
];
|
||||||
|
|
13
profiles/qemu_user/qemu_user.nix
Normal file
13
profiles/qemu_user/qemu_user.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ config, pkgs, ... }: {
|
||||||
|
boot.binfmt.registrations.aarch64 = {
|
||||||
|
interpreter = "${pkgs.qemu}/bin/qemu-aarch64";
|
||||||
|
magicOrExtension =
|
||||||
|
"\\x7fELF\\x02\\x01\\x01\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x02\\x00\\xb7\\x00";
|
||||||
|
mask =
|
||||||
|
"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\x00\\xff\\xff\\xff\\xff\\xff\\xff\\x00\\xff\\xfe\\xff\\xff\\xff";
|
||||||
|
};
|
||||||
|
nix.sandboxPaths = [ "/run/binfmt" "${pkgs.qemu}" ];
|
||||||
|
nix.extraOptions = ''
|
||||||
|
extra-platforms = aarch64-linux ${pkgs.system}
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in a new issue