summaryrefslogtreecommitdiffstats
path: root/lass/4lib/default.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2015-09-23 11:57:27 +0200
committermakefu <github@syntax-fehler.de>2015-09-23 11:57:27 +0200
commitb88363ce1a4ecc420f2c7684c9c74949cd2b5db4 (patch)
tree2da33dd2e421d498b3172e46234242e1c76370a1 /lass/4lib/default.nix
parentbb0ec5e74b6ca0737bc49408f00f8918710872a6 (diff)
parente3222a7e7096d155da507ef41bbb2002ff4aed89 (diff)
Merge remote-tracking branch 'cloudkrebs/master' into pre-merge
Diffstat (limited to 'lass/4lib/default.nix')
-rw-r--r--lass/4lib/default.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/lass/4lib/default.nix b/lass/4lib/default.nix
index 21a083d1a..2e493177d 100644
--- a/lass/4lib/default.nix
+++ b/lass/4lib/default.nix
@@ -17,4 +17,8 @@ krebs // rec {
ln -s ${pkgs.writeScript name content} $out/bin/${name}
'';
};
+
+ getDefaultGateway = ip:
+ concatStringsSep "." (take 3 (splitString "." ip) ++ ["1"]);
+
}