forked from DGNum/liminix
0c25983c0b
the default kconfig should be in a config stanza, not in the default attr of the options stanza, otherwise it gets overridden completely instead of merged
30 lines
862 B
Nix
30 lines
862 B
Nix
{ device ? (import devices/gl-ar750.nix)
|
|
}:
|
|
|
|
let
|
|
overlay = import ./overlay.nix;
|
|
nixpkgs = import <nixpkgs> ( device.system // {overlays = [overlay]; });
|
|
config = (import ./merge-modules.nix) [
|
|
./modules/base.nix
|
|
({ lib, ... } : { config = { inherit (device) kernel; }; })
|
|
<liminix-config>
|
|
] nixpkgs.pkgs;
|
|
finalConfig = config // {
|
|
packages = (with nixpkgs.pkgs; [ s6-rc ]) ++
|
|
config.systemPackages ++
|
|
(builtins.attrValues config.services)
|
|
;
|
|
};
|
|
squashfs = (import ./make-image.nix) nixpkgs finalConfig;
|
|
kernel = (import ./make-kernel.nix) nixpkgs finalConfig.kernel.config;
|
|
in {
|
|
outputs = {
|
|
inherit squashfs kernel;
|
|
default = nixpkgs.pkgs.runCommand "both-kinds" {} ''
|
|
mkdir $out
|
|
cd $out
|
|
ln -s ${squashfs} squashfs
|
|
ln -s ${kernel.vmlinux} vmlinux
|
|
'';
|
|
};
|
|
}
|