bump, cross fixes
This commit is contained in:
parent
68a83d1575
commit
62c7179b62
9 changed files with 58 additions and 50 deletions
|
@ -1,2 +0,0 @@
|
|||
{inputs, ...}: {
|
||||
}
|
|
@ -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 = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
crossPkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
|
@ -10,7 +10,8 @@
|
|||
import
|
||||
"${inputs.sdm845}/nixos/profiles/boot/kernel/sdm845-mainline"
|
||||
{
|
||||
inherit pkgs lib config;
|
||||
inherit lib config;
|
||||
pkgs = crossPkgs;
|
||||
inputs = inputs.sdm845.inputs;
|
||||
})
|
||||
];
|
||||
|
@ -18,7 +19,7 @@
|
|||
boot.initrd.allowMissingModules = true;
|
||||
|
||||
nixpkgs = {
|
||||
hostPlatform = "aarch64-linux"; # Do i use binfmt here
|
||||
hostPlatform = "aarch64-linux";
|
||||
config.allowBroken = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -5,38 +5,38 @@
|
|||
}: let
|
||||
ibusPath = "i18n/input-method/default.nix";
|
||||
in {
|
||||
disabledModules = [ibusPath];
|
||||
imports = [
|
||||
(import "${inputs.ibus-fix}/nixos/modules/${ibusPath}")
|
||||
];
|
||||
# disabledModules = [ibusPath];
|
||||
# imports = [
|
||||
# (import "${inputs.ibus-fix}/nixos/modules/${ibusPath}")
|
||||
# ];
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(_: super: {
|
||||
# https://github.com/NixOS/nixpkgs/pull/434550
|
||||
iniparser = super.iniparser.overrideAttrs (old: {
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "BUILD_TESTING" false)
|
||||
];
|
||||
});
|
||||
# nixpkgs.overlays = [
|
||||
# (_: super: {
|
||||
# # https://github.com/NixOS/nixpkgs/pull/434550
|
||||
# iniparser = super.iniparser.overrideAttrs (old: {
|
||||
# cmakeFlags = [
|
||||
# (lib.cmakeBool "BUILD_TESTING" false)
|
||||
# ];
|
||||
# });
|
||||
|
||||
# TODO: Upstream to nixpkgs
|
||||
glycin-loaders = super.glycin-loaders.overrideAttrs (old: {
|
||||
env.CARGO_BUILD_TARGET = super.stdenv.hostPlatform.rust.rustcTargetSpec;
|
||||
postPatch = ''
|
||||
substituteInPlace loaders/meson.build \
|
||||
--replace-fail "cargo_target_dir / rust_target / loader," "cargo_target_dir / '${super.stdenv.hostPlatform.rust.cargoShortTarget}' / rust_target / loader,"
|
||||
'';
|
||||
# # TODO: Upstream to nixpkgs
|
||||
# glycin-loaders = super.glycin-loaders.overrideAttrs (old: {
|
||||
# env.CARGO_BUILD_TARGET = super.stdenv.hostPlatform.rust.rustcTargetSpec;
|
||||
# postPatch = ''
|
||||
# substituteInPlace loaders/meson.build \
|
||||
# --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];
|
||||
cargoVendorDir = "vendor";
|
||||
});
|
||||
# nativeBuildInputs = (old.nativeBuildInputs or []) ++ [super.buildPackages.rustPlatform.cargoSetupHook];
|
||||
# cargoVendorDir = "vendor";
|
||||
# });
|
||||
|
||||
# TODO: Maybe upstream to nixpkgs (ruby maintainer please reply to my DM)
|
||||
ruby_3_3 = super.ruby_3_3.overrideAttrs (old: {
|
||||
NIX_RUSTFLAGS =
|
||||
(old.NIX_RUSTFLAGS or "")
|
||||
+ " --target ${super.stdenv.hostPlatform.rust.rustcTargetSpec}";
|
||||
});
|
||||
})
|
||||
];
|
||||
# # TODO: Maybe upstream to nixpkgs (ruby maintainer please reply to my DM)
|
||||
# ruby_3_3 = super.ruby_3_3.overrideAttrs (old: {
|
||||
# NIX_RUSTFLAGS =
|
||||
# (old.NIX_RUSTFLAGS or "")
|
||||
# + " --target ${super.stdenv.hostPlatform.rust.rustcTargetSpec}";
|
||||
# });
|
||||
# })
|
||||
# ];
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
modulesPath,
|
||||
crossPkgs,
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
|
@ -46,14 +47,14 @@ in {
|
|||
};
|
||||
"20-esp" = {
|
||||
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/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
|
||||
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
|
||||
efi /EFI/EDK2-UEFI-SHELL/SHELL.EFI
|
||||
'';
|
||||
|
@ -68,7 +69,7 @@ in {
|
|||
};
|
||||
"30-root" = {
|
||||
storePaths = [config.system.build.toplevel];
|
||||
contents."/boot".source = pkgs.runCommand "boot" {} "mkdir $out";
|
||||
contents."/boot".source = crossPkgs.runCommand "boot" {} "mkdir $out";
|
||||
repartConfig = {
|
||||
Type = "root";
|
||||
Format = "ext4";
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
environmentFile = config.age.secrets."base64JwtSecret.age".path;
|
||||
package = pkgs.caddy.withPlugins {
|
||||
plugins = ["github.com/ggicci/caddy-jwt@v1.1.0"];
|
||||
hash = "sha256-erLYIrrzX19iLEBgq8KIgq+6RDg99Z7tN7FCViG19s4=";
|
||||
hash = "sha256-RvpZh7iL5vsuvTTSHYYu2blAdO0tINxWWuT9IPlni7o=";
|
||||
};
|
||||
|
||||
virtualHosts =
|
||||
|
|
13
flake.nix
13
flake.nix
|
@ -71,9 +71,15 @@
|
|||
};
|
||||
system = info:
|
||||
lib.nixosSystem {
|
||||
inherit (info) system;
|
||||
specialArgs = {
|
||||
inherit inputs dirUtils;
|
||||
isDesktop = info.isDesktop or false;
|
||||
crossPkgs = import inputs.nixpkgs {
|
||||
hostPlatform = info.system;
|
||||
localSystem = info.system;
|
||||
buildPlatform = "x86_64-linux";
|
||||
};
|
||||
};
|
||||
|
||||
modules = with dirUtils;
|
||||
|
@ -104,11 +110,14 @@
|
|||
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;
|
||||
"quadtop".isDesktop = true;
|
||||
"quadraticserver".isServer = true;
|
||||
"quadphone".isGraphical = true;
|
||||
"quadphone" = {
|
||||
isGraphical = true;
|
||||
system = "aarch64-linux";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
{lib, ...}: {
|
||||
nixpkgs = {
|
||||
hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
buildPlatform = "x86_64-linux";
|
||||
};
|
||||
}
|
1
modules/desktop/binfmt.nix
Normal file
1
modules/desktop/binfmt.nix
Normal file
|
@ -0,0 +1 @@
|
|||
{boot.binfmt.emulatedSystems = ["aarch64-linux"];}
|
Loading…
Add table
Add a link
Reference in a new issue