b60ce985b7
it wasn't really adding value once I learned that evalModules is at nixpkgs.lib https://github.com/telent/liminix/compare/main...vesim987:liminix:main#diff-8ebcd005c04c8eddff72aa83f26a9ee6cfef3c04ce16b8f051aa6c6f4b0c9e73L1
52 lines
1.2 KiB
Nix
52 lines
1.2 KiB
Nix
{
|
|
device
|
|
, liminix-config ? <liminix-config>
|
|
, nixpkgs ? <nixpkgs>
|
|
}:
|
|
|
|
let
|
|
overlay = import ./overlay.nix;
|
|
pkgs = import nixpkgs (device.system // {
|
|
overlays = [overlay];
|
|
config = {allowUnsupportedSystem = true; };
|
|
});
|
|
|
|
config = (pkgs.lib.evalModules {
|
|
modules = [
|
|
{ _module.args = { inherit pkgs; lib = pkgs.lib; }; }
|
|
./modules/base.nix
|
|
device.module
|
|
liminix-config
|
|
./modules/s6
|
|
./modules/users.nix
|
|
./modules/outputs.nix
|
|
];
|
|
}).config;
|
|
|
|
borderVm = ((import <nixpkgs/nixos/lib/eval-config.nix>) {
|
|
system = builtins.currentSystem;
|
|
modules = [
|
|
({ ... } : { nixpkgs.overlays = [ overlay ]; })
|
|
(import ./bordervm-configuration.nix)
|
|
];
|
|
}).config.system;
|
|
in {
|
|
outputs = config.outputs // {
|
|
default = config.outputs.${config.device.defaultOutput};
|
|
};
|
|
|
|
# this is just here as a convenience, so that we can get a
|
|
# cross-compiling nix-shell for any package we're customizing
|
|
inherit pkgs;
|
|
|
|
buildEnv = pkgs.mkShell {
|
|
packages = with pkgs.pkgsBuildBuild; [
|
|
tufted
|
|
routeros.routeros
|
|
routeros.ros-exec-script
|
|
mips-vm
|
|
borderVm.build.vm
|
|
go-l2tp
|
|
];
|
|
};
|
|
}
|