default.nix (1528B)
1 { 2 device 3 , liminix-config ? <liminix-config> 4 , nixpkgs ? <nixpkgs> 5 , borderVmConf ? ./bordervm.conf.nix 6 }: 7 8 let 9 overlay = import ./overlay.nix; 10 pkgs = import nixpkgs (device.system // { 11 overlays = [overlay]; 12 config = { 13 allowUnsupportedSystem = true; # mipsel 14 permittedInsecurePackages = [ 15 "python-2.7.18.6" # kernel backports needs python <3 16 ]; 17 }; 18 }); 19 20 config = (pkgs.lib.evalModules { 21 modules = [ 22 { _module.args = { inherit pkgs; lib = pkgs.lib; }; } 23 ./modules/hardware.nix 24 ./modules/base.nix 25 ./modules/busybox.nix 26 ./modules/hostname.nix 27 device.module 28 liminix-config 29 ./modules/s6 30 ./modules/users.nix 31 ./modules/outputs.nix 32 ]; 33 }).config; 34 35 borderVm = ((import <nixpkgs/nixos/lib/eval-config.nix>) { 36 system = builtins.currentSystem; 37 modules = [ 38 ({ ... } : { nixpkgs.overlays = [ overlay ]; }) 39 (import ./bordervm-configuration.nix) 40 borderVmConf 41 ]; 42 }).config.system; 43 in { 44 outputs = config.system.outputs // { 45 default = config.system.outputs.${config.hardware.defaultOutput}; 46 }; 47 48 # this is just here as a convenience, so that we can get a 49 # cross-compiling nix-shell for any package we're customizing 50 inherit pkgs; 51 52 buildEnv = pkgs.mkShell { 53 packages = with pkgs.pkgsBuildBuild; [ 54 tufted 55 routeros.routeros 56 routeros.ros-exec-script 57 mips-vm 58 borderVm.build.vm 59 go-l2tp 60 min-copy-closure 61 fennelrepl 62 ]; 63 }; 64 }