put liminix-tools in package overlay

This commit is contained in:
Daniel Barlow 2022-09-22 11:10:41 +01:00
parent 4eea1b1f18
commit e46abbccca
6 changed files with 16 additions and 8 deletions

View file

@ -11,7 +11,6 @@ let
}; };
config = baseConfig // (import <liminix-config>) { config = baseConfig // (import <liminix-config>) {
config = baseConfig; config = baseConfig;
tools = nixpkgs.pkgs.callPackage ./tools {};
inherit (nixpkgs) pkgs; inherit (nixpkgs) pkgs;
}; };
finalConfig = config // { finalConfig = config // {

View file

@ -2,4 +2,5 @@ final: prev: {
pseudofile = final.callPackage ./pkgs/pseudofile {}; pseudofile = final.callPackage ./pkgs/pseudofile {};
s6-init-files = final.callPackage ./pkgs/s6-init-files {}; s6-init-files = final.callPackage ./pkgs/s6-init-files {};
strace = prev.strace.override { libunwind = null; }; strace = prev.strace.override { libunwind = null; };
liminix = final.callPackage ./pkgs/liminix-tools {};
} }

View file

@ -3,6 +3,7 @@
, s6-rc , s6-rc
, lib , lib
, busybox , busybox
, callPackage
} :let } :let
inherit (builtins) concatStringsSep; inherit (builtins) concatStringsSep;
longrun = { longrun = {
@ -71,10 +72,7 @@ in {
up = "ip address add ${addr} dev ${interface.device} "; up = "ip address add ${addr} dev ${interface.device} ";
down = "ip address del ${addr} dev ${interface.device} "; down = "ip address del ${addr} dev ${interface.device} ";
}; };
udhcpc = interface: { ... } @ args: longrun { udhcpc = callPackage ./networking/udhcpc.nix {};
name = "${interface.device}.udhcp";
run = "${busybox}/bin/udhcpc -f -i ${interface.device}";
};
odhcpc = interface: { ... } @ args: longrun { odhcpc = interface: { ... } @ args: longrun {
name = "${interface.device}.odhcp"; name = "${interface.device}.odhcp";
run = "odhcpcd ${interface.device}"; run = "odhcpcd ${interface.device}";

View file

@ -0,0 +1,10 @@
{
liminix
, busybox
} :
let inherit (liminix.services) longrun;
in
interface: { ... } @ args: longrun {
name = "${interface.device}.udhcp";
run = "${busybox}/bin/udhcpc -f -i ${interface.device}";
}

View file

@ -1,7 +1,7 @@
{ config, tools, pkgs } : { config, pkgs } :
let let
inherit (tools.networking) interface address udhcpc odhcpc; inherit (pkgs.liminix.networking) interface address udhcpc odhcpc;
inherit (tools.services) oneshot longrun bundle target output; inherit (pkgs.liminix.services) oneshot longrun bundle target output;
in rec { in rec {
services.loopback = services.loopback =
let iface = interface { type = "loopback"; device = "lo";}; let iface = interface { type = "loopback"; device = "lo";};