diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2015-11-04 14:26:18 +0100 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2015-11-04 14:26:18 +0100 |
| commit | bf9ac632c4264d08edb9b64786c48c2dc9331fb9 (patch) | |
| tree | f22c02b6eb37179ee075d5a74e10bb1433b63da3 | |
| parent | db0ee933e845c51699dabd65cf6c0a37c7215360 (diff) | |
| download | nixos-bf9ac632c4264d08edb9b64786c48c2dc9331fb9.tar nixos-bf9ac632c4264d08edb9b64786c48c2dc9331fb9.tar.gz nixos-bf9ac632c4264d08edb9b64786c48c2dc9331fb9.tar.bz2 nixos-bf9ac632c4264d08edb9b64786c48c2dc9331fb9.tar.xz nixos-bf9ac632c4264d08edb9b64786c48c2dc9331fb9.zip | |
New host definitions in VPNs
| -rwxr-xr-x | custom/tinc/generate_hostfile.hs | 4 | ||||
| m--------- | laeradhr | 0 | ||||
| m--------- | yggdrasil | 0 |
3 files changed, 3 insertions, 1 deletions
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 | |||
| 9 | genHostFile :: AnchoredDirTree String -> String | 9 | genHostFile :: AnchoredDirTree String -> String |
| 10 | genHostFile (_ :/ (Dir _ contents)) = "{\n" ++ entries ++ "\n}\n" | 10 | genHostFile (_ :/ (Dir _ contents)) = "{\n" ++ entries ++ "\n}\n" |
| 11 | where | 11 | where |
| 12 | entries = concatMap $ [genEntry name content | (File name content) <- contents] | 12 | entries = concat $ [genEntry name content | (File name content) <- contents, name `notElem` hidden] |
| 13 | genEntry fileName fileContent = unlines . indent $ [ "\"" ++ fileName ++ "\" = ''" ] ++ indent (lines fileContent) ++ [ "'';" ] | 13 | genEntry fileName fileContent = unlines . indent $ [ "\"" ++ fileName ++ "\" = ''" ] ++ indent (lines fileContent) ++ [ "'';" ] |
| 14 | hidden = [ "hosts.nix" | ||
| 15 | ] | ||
| 14 | 16 | ||
| 15 | indent :: [String] -> [String] | 17 | indent :: [String] -> [String] |
| 16 | indent = map (" " ++) | 18 | indent = map (" " ++) |
diff --git a/laeradhr b/laeradhr | |||
| Subproject ae41b8e91dec5767f8b8bd0274bc39917c0781a | Subproject 58177eb1a8b66e80c53c52112297461afaf2ebf | ||
diff --git a/yggdrasil b/yggdrasil | |||
| Subproject d000521f283ae6d3df15047c4f069aaf40dcf97 | Subproject 6fe6b93090cffcfd22a3e73d4628193422c0cc2 | ||
