diff options
author | lassulus <lass@aidsballs.de> | 2015-09-18 03:00:29 +0200 |
---|---|---|
committer | lassulus <lass@aidsballs.de> | 2015-09-18 03:00:29 +0200 |
commit | 79f0abfdfc996882306d65cc1b815286c2c92648 (patch) | |
tree | d8c2c5aa8c2bf8d7303e97c16c87407fd81f893b /lass/4lib/default.nix | |
parent | b35fd2bb734e0d857ba6d673e924affafe1475e6 (diff) |
lass 4: add getDefaultGateway helper function
Diffstat (limited to 'lass/4lib/default.nix')
-rw-r--r-- | lass/4lib/default.nix | 4 |
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"]); + } |