2022-09-20 00:51:38 +02:00
|
|
|
{ device ? (import devices/gl-ar750.nix)
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
overlay = import ./overlay.nix;
|
|
|
|
nixpkgs = import <nixpkgs> ( device.system // {overlays = [overlay]; });
|
2022-09-25 12:22:15 +02:00
|
|
|
config = (import ./merge-modules.nix) [
|
|
|
|
(import ./modules/base.nix { inherit device; })
|
|
|
|
<liminix-config>
|
|
|
|
] nixpkgs.pkgs;
|
2022-09-20 00:51:38 +02:00
|
|
|
finalConfig = config // {
|
|
|
|
packages = (with nixpkgs.pkgs; [ s6-rc ]) ++
|
|
|
|
config.systemPackages ++
|
|
|
|
(builtins.attrValues config.services)
|
|
|
|
;
|
|
|
|
};
|
2022-09-20 19:54:27 +02:00
|
|
|
squashfs = (import ./make-image.nix) nixpkgs finalConfig;
|
|
|
|
kernel = (import ./make-kernel.nix) nixpkgs finalConfig;
|
|
|
|
in {
|
|
|
|
outputs = {
|
|
|
|
inherit squashfs kernel;
|
2022-09-21 00:04:08 +02:00
|
|
|
default = nixpkgs.pkgs.runCommand "both-kinds" {} ''
|
|
|
|
mkdir $out
|
|
|
|
cd $out
|
|
|
|
ln -s ${squashfs} squashfs
|
|
|
|
ln -s ${kernel.vmlinux} vmlinux
|
|
|
|
'';
|
2022-09-20 19:54:27 +02:00
|
|
|
};
|
|
|
|
}
|