mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 19:46:07 +01:00
flake: fix outputs
This commit is contained in:
parent
9dfa32878b
commit
fc9072bb20
1 changed files with 12 additions and 7 deletions
19
flake.nix
19
flake.nix
|
|
@ -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;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue