From bf9ac632c4264d08edb9b64786c48c2dc9331fb9 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 4 Nov 2015 14:26:18 +0100 Subject: New host definitions in VPNs --- custom/tinc/generate_hostfile.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'custom') diff --git a/custom/tinc/generate_hostfile.hs b/custom/tinc/generate_hostfile.hs index 6d4217fd..a781fed6 100755 --- a/custom/tinc/generate_hostfile.hs +++ b/custom/tinc/generate_hostfile.hs @@ -9,8 +9,10 @@ main = readDirectory "." >>= putStrLn . genHostFile genHostFile :: AnchoredDirTree String -> String genHostFile (_ :/ (Dir _ contents)) = "{\n" ++ entries ++ "\n}\n" where - entries = concatMap $ [genEntry name content | (File name content) <- contents] + entries = concat $ [genEntry name content | (File name content) <- contents, name `notElem` hidden] genEntry fileName fileContent = unlines . indent $ [ "\"" ++ fileName ++ "\" = ''" ] ++ indent (lines fileContent) ++ [ "'';" ] + hidden = [ "hosts.nix" + ] indent :: [String] -> [String] indent = map (" " ++) -- cgit v1.2.3