bump, cross fixes

This commit is contained in:
Henry Hiles 2025-08-29 18:14:02 -04:00
commit 62c7179b62
No known key found for this signature in database
9 changed files with 58 additions and 50 deletions

View file

@ -1,2 +0,0 @@
{inputs, ...}: {
}

View file

@ -1,5 +1,9 @@
{inputs, ...}: { {
nixpkgs.overlays = [inputs.gnome-mobile.overlays.default]; inputs,
crossPkgs,
...
}: {
nixpkgs.overlays = [(self: super: inputs.gnome-mobile.overlays.default self crossPkgs)];
i18n.inputMethod = { i18n.inputMethod = {
enable = true; enable = true;

View file

@ -1,7 +1,7 @@
{ {
config, config,
inputs, inputs,
pkgs, crossPkgs,
lib, lib,
... ...
}: { }: {
@ -10,7 +10,8 @@
import import
"${inputs.sdm845}/nixos/profiles/boot/kernel/sdm845-mainline" "${inputs.sdm845}/nixos/profiles/boot/kernel/sdm845-mainline"
{ {
inherit pkgs lib config; inherit lib config;
pkgs = crossPkgs;
inputs = inputs.sdm845.inputs; inputs = inputs.sdm845.inputs;
}) })
]; ];
@ -18,7 +19,7 @@
boot.initrd.allowMissingModules = true; boot.initrd.allowMissingModules = true;
nixpkgs = { nixpkgs = {
hostPlatform = "aarch64-linux"; # Do i use binfmt here hostPlatform = "aarch64-linux";
config.allowBroken = true; config.allowBroken = true;
}; };
} }

View file

@ -5,38 +5,38 @@
}: let }: let
ibusPath = "i18n/input-method/default.nix"; ibusPath = "i18n/input-method/default.nix";
in { in {
disabledModules = [ibusPath]; # disabledModules = [ibusPath];
imports = [ # imports = [
(import "${inputs.ibus-fix}/nixos/modules/${ibusPath}") # (import "${inputs.ibus-fix}/nixos/modules/${ibusPath}")
]; # ];
nixpkgs.overlays = [ # nixpkgs.overlays = [
(_: super: { # (_: super: {
# https://github.com/NixOS/nixpkgs/pull/434550 # # https://github.com/NixOS/nixpkgs/pull/434550
iniparser = super.iniparser.overrideAttrs (old: { # iniparser = super.iniparser.overrideAttrs (old: {
cmakeFlags = [ # cmakeFlags = [
(lib.cmakeBool "BUILD_TESTING" false) # (lib.cmakeBool "BUILD_TESTING" false)
]; # ];
}); # });
# TODO: Upstream to nixpkgs # # TODO: Upstream to nixpkgs
glycin-loaders = super.glycin-loaders.overrideAttrs (old: { # glycin-loaders = super.glycin-loaders.overrideAttrs (old: {
env.CARGO_BUILD_TARGET = super.stdenv.hostPlatform.rust.rustcTargetSpec; # env.CARGO_BUILD_TARGET = super.stdenv.hostPlatform.rust.rustcTargetSpec;
postPatch = '' # postPatch = ''
substituteInPlace loaders/meson.build \ # substituteInPlace loaders/meson.build \
--replace-fail "cargo_target_dir / rust_target / loader," "cargo_target_dir / '${super.stdenv.hostPlatform.rust.cargoShortTarget}' / rust_target / loader," # --replace-fail "cargo_target_dir / rust_target / loader," "cargo_target_dir / '${super.stdenv.hostPlatform.rust.cargoShortTarget}' / rust_target / loader,"
''; # '';
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [super.buildPackages.rustPlatform.cargoSetupHook]; # nativeBuildInputs = (old.nativeBuildInputs or []) ++ [super.buildPackages.rustPlatform.cargoSetupHook];
cargoVendorDir = "vendor"; # cargoVendorDir = "vendor";
}); # });
# TODO: Maybe upstream to nixpkgs (ruby maintainer please reply to my DM) # # TODO: Maybe upstream to nixpkgs (ruby maintainer please reply to my DM)
ruby_3_3 = super.ruby_3_3.overrideAttrs (old: { # ruby_3_3 = super.ruby_3_3.overrideAttrs (old: {
NIX_RUSTFLAGS = # NIX_RUSTFLAGS =
(old.NIX_RUSTFLAGS or "") # (old.NIX_RUSTFLAGS or "")
+ " --target ${super.stdenv.hostPlatform.rust.rustcTargetSpec}"; # + " --target ${super.stdenv.hostPlatform.rust.rustcTargetSpec}";
}); # });
}) # })
]; # ];
} }

View file

@ -1,5 +1,6 @@
{ {
modulesPath, modulesPath,
crossPkgs,
pkgs, pkgs,
config, config,
lib, lib,
@ -46,14 +47,14 @@ in {
}; };
"20-esp" = { "20-esp" = {
contents = { contents = {
"/EFI/EDK2-UEFI-SHELL/SHELL.EFI".source = "${pkgs.edk2-uefi-shell.overrideAttrs {env.NIX_CFLAGS_COMPILE = "-Wno-error=maybe-uninitialized";}}/shell.efi"; "/EFI/EDK2-UEFI-SHELL/SHELL.EFI".source = "${crossPkgs.edk2-uefi-shell.overrideAttrs {env.NIX_CFLAGS_COMPILE = "-Wno-error=maybe-uninitialized";}}/shell.efi";
"/EFI/BOOT/BOOT${lib.toUpper efiArch}.EFI".source = "${pkgs.systemd}/lib/systemd/boot/efi/systemd-boot${efiArch}.efi"; "/EFI/BOOT/BOOT${lib.toUpper efiArch}.EFI".source = "${pkgs.systemd}/lib/systemd/boot/efi/systemd-boot${efiArch}.efi";
"/EFI/Linux/${config.system.boot.loader.ukiFile}".source = "${config.system.build.uki}/${config.system.boot.loader.ukiFile}"; "/EFI/Linux/${config.system.boot.loader.ukiFile}".source = "${config.system.build.uki}/${config.system.boot.loader.ukiFile}";
"/loader/loader.conf".source = pkgs.writeText "loader.conf" '' "/loader/loader.conf".source = crossPkgs.writeText "loader.conf" ''
timeout 5 timeout 5
console-mode keep console-mode keep
''; '';
"/loader/entries/shell.conf".source = pkgs.writeText "shell.conf" '' "/loader/entries/shell.conf".source = crossPkgs.writeText "shell.conf" ''
title EDK2 UEFI Shell title EDK2 UEFI Shell
efi /EFI/EDK2-UEFI-SHELL/SHELL.EFI efi /EFI/EDK2-UEFI-SHELL/SHELL.EFI
''; '';
@ -68,7 +69,7 @@ in {
}; };
"30-root" = { "30-root" = {
storePaths = [config.system.build.toplevel]; storePaths = [config.system.build.toplevel];
contents."/boot".source = pkgs.runCommand "boot" {} "mkdir $out"; contents."/boot".source = crossPkgs.runCommand "boot" {} "mkdir $out";
repartConfig = { repartConfig = {
Type = "root"; Type = "root";
Format = "ext4"; Format = "ext4";

View file

@ -13,7 +13,7 @@
environmentFile = config.age.secrets."base64JwtSecret.age".path; environmentFile = config.age.secrets."base64JwtSecret.age".path;
package = pkgs.caddy.withPlugins { package = pkgs.caddy.withPlugins {
plugins = ["github.com/ggicci/caddy-jwt@v1.1.0"]; plugins = ["github.com/ggicci/caddy-jwt@v1.1.0"];
hash = "sha256-erLYIrrzX19iLEBgq8KIgq+6RDg99Z7tN7FCViG19s4="; hash = "sha256-RvpZh7iL5vsuvTTSHYYu2blAdO0tINxWWuT9IPlni7o=";
}; };
virtualHosts = virtualHosts =

View file

@ -71,9 +71,15 @@
}; };
system = info: system = info:
lib.nixosSystem { lib.nixosSystem {
inherit (info) system;
specialArgs = { specialArgs = {
inherit inputs dirUtils; inherit inputs dirUtils;
isDesktop = info.isDesktop or false; isDesktop = info.isDesktop or false;
crossPkgs = import inputs.nixpkgs {
hostPlatform = info.system;
localSystem = info.system;
buildPlatform = "x86_64-linux";
};
}; };
modules = with dirUtils; modules = with dirUtils;
@ -104,11 +110,14 @@
formatter = pkgs.alejandra; formatter = pkgs.alejandra;
}; };
flake.nixosConfigurations = builtins.mapAttrs (name: value: system (value // {hostname = name;})) { flake.nixosConfigurations = builtins.mapAttrs (name: value: system ({system = "x86_64-linux";} // value // {hostname = name;})) {
"quadraticpc".isDesktop = true; "quadraticpc".isDesktop = true;
"quadtop".isDesktop = true; "quadtop".isDesktop = true;
"quadraticserver".isServer = true; "quadraticserver".isServer = true;
"quadphone".isGraphical = true; "quadphone" = {
isGraphical = true;
system = "aarch64-linux";
};
}; };
}; };
} }

View file

@ -1,6 +0,0 @@
{lib, ...}: {
nixpkgs = {
hostPlatform = lib.mkDefault "x86_64-linux";
buildPlatform = "x86_64-linux";
};
}

View file

@ -0,0 +1 @@
{boot.binfmt.emulatedSystems = ["aarch64-linux"];}