liminix-fork/default.nix
Daniel Barlow c3bb33c9ce add fennelrepl package
Runs fennel using a Lua compiled with the same options as the
host system, and with packages set up so it can find all the local
Lua packages

To shorten the dev feedback loop further, allows FENNEL_PATH to be set
on the command line so you can point directly it at the Fennel sources
for some library you're working against instead of having to run
nix-build and compile them to Lua
2023-07-04 22:58:51 +01:00

64 lines
1.5 KiB
Nix

{
device
, liminix-config ? <liminix-config>
, nixpkgs ? <nixpkgs>
, borderVmConf ? ./bordervm.conf.nix
}:
let
overlay = import ./overlay.nix;
pkgs = import nixpkgs (device.system // {
overlays = [overlay];
config = {
allowUnsupportedSystem = true; # mipsel
permittedInsecurePackages = [
"python-2.7.18.6" # kernel backports needs python <3
];
};
});
config = (pkgs.lib.evalModules {
modules = [
{ _module.args = { inherit pkgs; lib = pkgs.lib; }; }
./modules/hardware.nix
./modules/base.nix
./modules/busybox.nix
./modules/hostname.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)
borderVmConf
];
}).config.system;
in {
outputs = config.outputs // {
default = config.outputs.${config.hardware.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
min-copy-closure
fennelrepl
];
};
}