aboutsummaryrefslogtreecommitdiffstats
path: root/lib/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/default.nix')
-rw-r--r--lib/default.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/default.nix b/lib/default.nix
index 5829250..f1f0007 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -36,6 +36,9 @@ let {
if lib.length y != 1 then throw "malformed /etc/hostname" else
lib.elemAt y 0;
+ firstWord = s:
+ lib.head (lib.match "^([^[:space:]]*).*" s);
+
isLocalTarget = let
origin = lib.mkTarget "";
in target: