fix(droid): make new overlay changes work
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-09-23 01:58:59 -04:00
parent ac2c81f1ef
commit 18216b8874

View file

@ -14,7 +14,7 @@ inputs: rec {
}; };
allowModularOverrides = { allowModularOverrides = {
cudaSupport, cudaSupport ? false,
system, system,
}: ({config, ...}: let }: ({config, ...}: let
pkgs = mkPkgs { pkgs = mkPkgs {
@ -43,26 +43,31 @@ inputs: rec {
++ extraModules; ++ extraModules;
}; };
mkNixOnDroid = mods: mkNixOnDroid = mods: let
system = "aarch64-linux";
in
inputs.nix-on-droid.lib.nixOnDroidConfiguration rec { inputs.nix-on-droid.lib.nixOnDroidConfiguration rec {
extraSpecialArgs = inputs; extraSpecialArgs = inputs;
home-manager-path = inputs.home-manager.outPath; home-manager-path = inputs.home-manager.outPath;
inherit (extraSpecialArgs) pkgs; pkgs = mkPkgs {
inherit system;
inherit (inputs) nixpkgs;
};
modules = modules =
[ [
(allowModularOverrides {system = "aarch64-linux";}) (allowModularOverrides {inherit system;})
({ ({
config, config,
lib, lib,
... ...
}: let }: let
inherit (lib) mkOption types; inherit (lib) mkForce mkOption types;
in { in {
# Adapt NixOnDroid to NixOS options # Adapt NixOnDroid to NixOS options
options.environment.variables = { options.environment = {
FLAKE = mkOption { variables.FLAKE = mkOption {
type = with types; nullOr str; type = with types; nullOr str;
}; };
systemPackages = mkOption { systemPackages = mkOption {
@ -72,6 +77,8 @@ inputs: rec {
}; };
config.environment.packages = config.environment.systemPackages; config.environment.packages = config.environment.systemPackages;
# This disables the assertion that fails because of nixpkgs.overlays
config._module.args.isFlake = mkForce false;
}) })
{home-manager = {inherit extraSpecialArgs;};} {home-manager = {inherit extraSpecialArgs;};}