2022-10-06 23:24:35 +00:00
|
|
|
{
|
2023-01-29 20:29:36 +00:00
|
|
|
device
|
2023-01-29 09:23:09 +00:00
|
|
|
, liminix-config ? <liminix-config>
|
2023-02-05 22:38:21 +00:00
|
|
|
, nixpkgs ? <nixpkgs>
|
2023-02-20 17:46:07 +00:00
|
|
|
, borderVmConf ? ./bordervm.conf.nix
|
2022-09-19 22:51:38 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
overlay = import ./overlay.nix;
|
2023-02-05 22:38:21 +00:00
|
|
|
pkgs = import nixpkgs (device.system // {
|
2023-02-10 17:54:33 +00:00
|
|
|
overlays = [overlay];
|
2023-02-20 17:46:07 +00:00
|
|
|
config = {
|
|
|
|
allowUnsupportedSystem = true; # mipsel
|
|
|
|
permittedInsecurePackages = [
|
|
|
|
"python-2.7.18.6" # kernel backports needs python <3
|
|
|
|
];
|
|
|
|
};
|
2023-01-29 10:00:13 +00:00
|
|
|
});
|
2023-02-10 23:10:44 +00:00
|
|
|
|
2023-02-16 17:22:27 +00:00
|
|
|
config = (pkgs.lib.evalModules {
|
|
|
|
modules = [
|
|
|
|
{ _module.args = { inherit pkgs; lib = pkgs.lib; }; }
|
2023-03-03 20:04:39 +00:00
|
|
|
./modules/hardware.nix
|
2023-02-16 17:22:27 +00:00
|
|
|
./modules/base.nix
|
2023-03-10 18:40:45 +00:00
|
|
|
./modules/busybox.nix
|
2023-03-08 22:11:59 +00:00
|
|
|
./modules/hostname.nix
|
2023-02-16 17:22:27 +00:00
|
|
|
device.module
|
|
|
|
liminix-config
|
|
|
|
./modules/s6
|
|
|
|
./modules/users.nix
|
|
|
|
./modules/outputs.nix
|
|
|
|
];
|
|
|
|
}).config;
|
2022-10-05 20:52:30 +00:00
|
|
|
|
2023-02-15 21:21:52 +00:00
|
|
|
borderVm = ((import <nixpkgs/nixos/lib/eval-config.nix>) {
|
|
|
|
system = builtins.currentSystem;
|
|
|
|
modules = [
|
|
|
|
({ ... } : { nixpkgs.overlays = [ overlay ]; })
|
|
|
|
(import ./bordervm-configuration.nix)
|
2023-02-20 17:46:07 +00:00
|
|
|
borderVmConf
|
2023-02-15 21:21:52 +00:00
|
|
|
];
|
2023-02-14 22:08:52 +00:00
|
|
|
}).config.system;
|
2022-10-03 21:28:15 +00:00
|
|
|
in {
|
2023-07-13 18:24:59 +00:00
|
|
|
outputs = config.system.outputs // {
|
|
|
|
default = config.system.outputs.${config.hardware.defaultOutput};
|
2023-02-10 23:10:44 +00:00
|
|
|
};
|
2022-10-03 21:28:15 +00:00
|
|
|
|
2022-09-25 12:18:26 +00: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-06 23:19:35 +00:00
|
|
|
inherit pkgs;
|
2023-02-08 00:03:37 +00:00
|
|
|
|
2023-02-08 18:10:11 +00:00
|
|
|
buildEnv = pkgs.mkShell {
|
|
|
|
packages = with pkgs.pkgsBuildBuild; [
|
|
|
|
tufted
|
|
|
|
routeros.routeros
|
|
|
|
routeros.ros-exec-script
|
2023-02-08 22:16:39 +00:00
|
|
|
mips-vm
|
2023-02-14 22:08:52 +00:00
|
|
|
borderVm.build.vm
|
|
|
|
go-l2tp
|
2023-05-11 22:53:25 +00:00
|
|
|
min-copy-closure
|
2023-07-04 21:58:51 +00:00
|
|
|
fennelrepl
|
2023-02-08 18:10:11 +00:00
|
|
|
];
|
|
|
|
};
|
2022-09-20 17:54:27 +00:00
|
|
|
}
|