2022-10-07 01:24:35 +02:00
|
|
|
{
|
2023-01-29 21:29:36 +01:00
|
|
|
device
|
2023-01-29 10:23:09 +01:00
|
|
|
, liminix-config ? <liminix-config>
|
2023-02-05 23:38:21 +01:00
|
|
|
, nixpkgs ? <nixpkgs>
|
2023-02-20 18:46:07 +01:00
|
|
|
, borderVmConf ? ./bordervm.conf.nix
|
2022-09-20 00:51:38 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
overlay = import ./overlay.nix;
|
2023-02-05 23:38:21 +01:00
|
|
|
pkgs = import nixpkgs (device.system // {
|
2023-02-10 18:54:33 +01:00
|
|
|
overlays = [overlay];
|
2023-02-20 18:46:07 +01:00
|
|
|
config = {
|
|
|
|
allowUnsupportedSystem = true; # mipsel
|
|
|
|
permittedInsecurePackages = [
|
|
|
|
"python-2.7.18.6" # kernel backports needs python <3
|
2023-12-04 14:15:06 +01:00
|
|
|
"python-2.7.18.7"
|
2023-02-20 18:46:07 +01:00
|
|
|
];
|
|
|
|
};
|
2023-01-29 11:00:13 +01:00
|
|
|
});
|
2023-02-11 00:10:44 +01:00
|
|
|
|
2023-11-09 20:29:36 +01:00
|
|
|
eval = pkgs.lib.evalModules {
|
2023-02-16 18:22:27 +01:00
|
|
|
modules = [
|
2023-11-05 16:13:06 +01:00
|
|
|
{ _module.args = { inherit pkgs; inherit (pkgs) lim; }; }
|
2023-03-03 21:04:39 +01:00
|
|
|
./modules/hardware.nix
|
2023-02-16 18:22:27 +01:00
|
|
|
./modules/base.nix
|
2023-03-10 19:40:45 +01:00
|
|
|
./modules/busybox.nix
|
2023-03-08 23:11:59 +01:00
|
|
|
./modules/hostname.nix
|
2023-02-16 18:22:27 +01:00
|
|
|
device.module
|
|
|
|
liminix-config
|
|
|
|
./modules/s6
|
|
|
|
./modules/users.nix
|
|
|
|
./modules/outputs.nix
|
|
|
|
];
|
2023-11-09 20:29:36 +01:00
|
|
|
};
|
|
|
|
config = eval.config;
|
2022-10-05 22:52:30 +02:00
|
|
|
|
2023-02-15 22:21:52 +01:00
|
|
|
borderVm = ((import <nixpkgs/nixos/lib/eval-config.nix>) {
|
|
|
|
system = builtins.currentSystem;
|
|
|
|
modules = [
|
|
|
|
({ ... } : { nixpkgs.overlays = [ overlay ]; })
|
|
|
|
(import ./bordervm-configuration.nix)
|
2023-02-20 18:46:07 +01:00
|
|
|
borderVmConf
|
2023-02-15 22:21:52 +01:00
|
|
|
];
|
2023-02-14 23:08:52 +01:00
|
|
|
}).config.system;
|
2022-10-03 23:28:15 +02:00
|
|
|
in {
|
2023-07-13 20:24:59 +02:00
|
|
|
outputs = config.system.outputs // {
|
|
|
|
default = config.system.outputs.${config.hardware.defaultOutput};
|
2023-11-09 20:29:36 +01:00
|
|
|
optionsJson =
|
|
|
|
let o = import ./doc/extract-options.nix {
|
|
|
|
inherit pkgs eval;
|
|
|
|
lib = pkgs.lib;
|
|
|
|
};
|
|
|
|
in pkgs.writeText "options.json" (builtins.toJSON o);
|
2023-02-11 00:10:44 +01:00
|
|
|
};
|
2022-10-03 23:28:15 +02:00
|
|
|
|
2022-09-25 14:18:26 +02:00
|
|
|
# this is just here as a convenience, so that we can get a
|
|
|
|
# cross-compiling nix-shell for any package we're customizing
|
2023-02-07 00:19:35 +01:00
|
|
|
inherit pkgs;
|
2023-02-08 01:03:37 +01:00
|
|
|
|
2023-02-08 19:10:11 +01:00
|
|
|
buildEnv = pkgs.mkShell {
|
|
|
|
packages = with pkgs.pkgsBuildBuild; [
|
|
|
|
tufted
|
|
|
|
routeros.routeros
|
|
|
|
routeros.ros-exec-script
|
2023-09-20 19:33:08 +02:00
|
|
|
run-liminix-vm
|
2023-02-14 23:08:52 +01:00
|
|
|
borderVm.build.vm
|
|
|
|
go-l2tp
|
2023-05-12 00:53:25 +02:00
|
|
|
min-copy-closure
|
2023-07-04 23:58:51 +02:00
|
|
|
fennelrepl
|
2023-02-08 19:10:11 +01:00
|
|
|
];
|
|
|
|
};
|
2022-09-20 19:54:27 +02:00
|
|
|
}
|