forked from DGNum/liminix
put liminix-tools in package overlay
This commit is contained in:
parent
4eea1b1f18
commit
e46abbccca
6 changed files with 16 additions and 8 deletions
|
@ -11,7 +11,6 @@ let
|
|||
};
|
||||
config = baseConfig // (import <liminix-config>) {
|
||||
config = baseConfig;
|
||||
tools = nixpkgs.pkgs.callPackage ./tools {};
|
||||
inherit (nixpkgs) pkgs;
|
||||
};
|
||||
finalConfig = config // {
|
||||
|
|
|
@ -2,4 +2,5 @@ final: prev: {
|
|||
pseudofile = final.callPackage ./pkgs/pseudofile {};
|
||||
s6-init-files = final.callPackage ./pkgs/s6-init-files {};
|
||||
strace = prev.strace.override { libunwind = null; };
|
||||
liminix = final.callPackage ./pkgs/liminix-tools {};
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
, s6-rc
|
||||
, lib
|
||||
, busybox
|
||||
, callPackage
|
||||
} :let
|
||||
inherit (builtins) concatStringsSep;
|
||||
longrun = {
|
||||
|
@ -71,10 +72,7 @@ in {
|
|||
up = "ip address add ${addr} dev ${interface.device} ";
|
||||
down = "ip address del ${addr} dev ${interface.device} ";
|
||||
};
|
||||
udhcpc = interface: { ... } @ args: longrun {
|
||||
name = "${interface.device}.udhcp";
|
||||
run = "${busybox}/bin/udhcpc -f -i ${interface.device}";
|
||||
};
|
||||
udhcpc = callPackage ./networking/udhcpc.nix {};
|
||||
odhcpc = interface: { ... } @ args: longrun {
|
||||
name = "${interface.device}.odhcp";
|
||||
run = "odhcpcd ${interface.device}";
|
10
pkgs/liminix-tools/networking/udhcpc.nix
Normal file
10
pkgs/liminix-tools/networking/udhcpc.nix
Normal 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}";
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{ config, tools, pkgs } :
|
||||
{ config, pkgs } :
|
||||
let
|
||||
inherit (tools.networking) interface address udhcpc odhcpc;
|
||||
inherit (tools.services) oneshot longrun bundle target output;
|
||||
inherit (pkgs.liminix.networking) interface address udhcpc odhcpc;
|
||||
inherit (pkgs.liminix.services) oneshot longrun bundle target output;
|
||||
in rec {
|
||||
services.loopback =
|
||||
let iface = interface { type = "loopback"; device = "lo";};
|
||||
|
|
Loading…
Reference in a new issue