2015-08-28 14:30:36 +00:00
|
|
|
{ lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
krebs = import ../../krebs/4lib { inherit lib; };
|
|
|
|
in
|
|
|
|
|
|
|
|
with krebs;
|
|
|
|
|
|
|
|
krebs // rec {
|
|
|
|
|
|
|
|
simpleScript = name: content:
|
|
|
|
pkgs.stdenv.mkDerivation {
|
|
|
|
inherit name;
|
|
|
|
phases = [ "installPhase" ];
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
ln -s ${pkgs.writeScript name content} $out/bin/${name}
|
|
|
|
'';
|
|
|
|
};
|
2015-09-18 01:00:29 +00:00
|
|
|
|
|
|
|
getDefaultGateway = ip:
|
|
|
|
concatStringsSep "." (take 3 (splitString "." ip) ++ ["1"]);
|
|
|
|
|
2015-08-28 14:30:36 +00:00
|
|
|
}
|