flake: fix outputs

This commit is contained in:
Tobias Happ 2022-07-09 15:31:25 +02:00
parent 9dfa32878b
commit fc9072bb20

View file

@ -11,10 +11,12 @@
outputs = { self, nixpkgs, flake-utils, home-manager }: outputs = { self, nixpkgs, flake-utils, home-manager }:
let let
systemDefault = "aarch64-linux";
overlay = nixpkgs.lib.composeManyExtensions (import ./overlays); overlay = nixpkgs.lib.composeManyExtensions (import ./overlays);
pkgs' = import nixpkgs { pkgs' = import nixpkgs {
system = "aarch64-linux"; system = systemDefault;
overlays = [ overlay ]; overlays = [ overlay ];
}; };
@ -23,24 +25,27 @@
}; };
in in
{ {
inherit overlay; overlays.default = overlay;
lib.nixOnDroidConfiguration = lib.nixOnDroidConfiguration =
{ config { config
, system ? "aarch64-linux" # unused, only supported variant , system ? systemDefault # unused, only supported variant
, extraModules ? [ ] , extraModules ? [ ]
, extraSpecialArgs ? { } , extraSpecialArgs ? { }
, pkgs ? pkgs' , pkgs ? pkgs'
, home-manager-path ? home-manager.outPath , home-manager-path ? home-manager.outPath
}: }:
if system != "aarch64-linux" then if system != systemDefault then
throw "aarch64-linux is the only currently supported system type" throw "${systemDefault} is the only currently supported system type"
else else
import ./modules { import ./modules {
inherit config extraModules extraSpecialArgs home-manager-path pkgs; inherit config extraModules extraSpecialArgs home-manager-path pkgs;
isFlake = true; isFlake = true;
}; };
apps.nix-on-droid.aarch64-linux = app;
defaultApp.aarch64-linux = app; apps.${systemDefault} = {
default = app;
nix-on-droid = app;
};
}; };
} }