Rebase to flake parts #7
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
{ ... }: {
|
||||
flake.nixosModules.systemUconsoleKernelBuilder =
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.chiasson.system.uconsoleKernelBuilder;
|
||||
in
|
||||
{
|
||||
options.chiasson.system.uconsoleKernelBuilder = {
|
||||
enable = lib.mkEnableOption ''
|
||||
x86_64 box: binfmt aarch64, looser sandbox, uConsole cache, ccache — for building the Pi image. Not for the device.
|
||||
'';
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
nix.settings = {
|
||||
extra-platforms = lib.mkDefault [ "aarch64-linux" ];
|
||||
|
||||
# Cross builds hit seccomp weirdness — turn sandbox off on this role.
|
||||
sandbox = lib.mkDefault false;
|
||||
filter-syscalls = lib.mkDefault false;
|
||||
|
||||
extra-sandbox-paths = [ config.programs.ccache.cacheDir ];
|
||||
};
|
||||
|
||||
boot.binfmt.emulatedSystems = lib.mkDefault [ "aarch64-linux" ];
|
||||
|
||||
programs.ccache.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user