diff --git a/Rakefile b/Rakefile index 905bde9..5f82c1e 100644 --- a/Rakefile +++ b/Rakefile @@ -42,7 +42,7 @@ end # # tasks for blockdiag files # -Dir['static/**/*.diag'].each do |diag_file| +Dir['src/images/**/*.diag'].each do |diag_file| name = diag_file[0..-6] svg_file = "#{name}.svg" @@ -64,7 +64,7 @@ end # # tasks for nwdiag files # -Dir['static/**/*.nwdiag'].each do |diag_file| +Dir['src/images/**/*.nwdiag'].each do |diag_file| name = diag_file[0..-8] svg_file = "#{name}.svg" @@ -86,7 +86,7 @@ end # # tasks for seqdiag files # -Dir['static/**/*.seqdiag'].each do |diag_file| +Dir['src/images/**/*.seqdiag'].each do |diag_file| name = diag_file[0..-9] svg_file = "#{name}.svg" @@ -108,7 +108,7 @@ end # # tasks for actdiag files # -Dir['static/**/*.actdiag'].each do |diag_file| +Dir['src/images/**/*.actdiag'].each do |diag_file| name = diag_file[0..-9] svg_file = "#{name}.svg" diff --git a/content/nixos/tinc.md b/content/nixos/tinc.md index 2fcccac..d1ca79a 100644 --- a/content/nixos/tinc.md +++ b/content/nixos/tinc.md @@ -35,10 +35,10 @@ and micromanage in the computer specific definitions. ## How to import You can use `fetchgit` to import it without downloading it yourself. - -{{% note %}} -To find the newest `rev` and `sha256` just call `nix-shell -p nix-prefetch-git --run "nix-prefetch-git https://github.com/mrVanDalo/nixos-tinc.git"` -{{% /note %}} +To find the newest `rev` and `sha256` just call +```shell +nix-shell -p nix-prefetch-git --run "nix-prefetch-git https://github.com/mrVanDalo/nixos-tinc.git" +``` ``` {pkgs, ... }: @@ -107,7 +107,9 @@ it will be the computer that connects all the other computer. You can have multiple computers which are reachable from the internet but for this example we only have one. -{{
}} +{{< card >}} +{{
}} +{{< /card >}} Here is the `configuration.nix`. First we define the whole topology in `default` and @@ -234,7 +236,9 @@ This is a very common problem in [Kubernetes](https://kubernetes.io/). It can be resolved by using the `tincSubnet` parameter, to configure sub-network routing. -{{
}} +{{< card >}} +{{
}} +{{< /card >}} Achieving this is very simple, just add the `tincSubnet` parameter in the `hosts` attribute and your done. diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 378f740..4e219b8 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,7 +1,10 @@ - + {{ .Title }} + {{/* needed for responsive design */}} + + diff --git a/static/nixos/tinc/2subnets.nwdiag b/src/images/2subnets.nwdiag similarity index 100% rename from static/nixos/tinc/2subnets.nwdiag rename to src/images/2subnets.nwdiag diff --git a/src/images/2subnets.png b/src/images/2subnets.png new file mode 100644 index 0000000..6e77130 Binary files /dev/null and b/src/images/2subnets.png differ diff --git a/src/images/2subnets.svg b/src/images/2subnets.svg new file mode 100644 index 0000000..d06eaf8 --- /dev/null +++ b/src/images/2subnets.svg @@ -0,0 +1,69 @@ + + + + + + + + + blockdiag + +nwdiag { + + internet [shape = cloud]; + + internet -- Gibson [address = "my.awesome.dns.com"] + + network private { + address = "10.1.1.0/24"; + + Gibson [address = "10.1.1.1"]; + Hackbardt [address = "10.1.1.2"]; + HAL [address = "10.1.1.3"]; + } + + network "private (subnet)" { + Hackbardt [address = "10.2.2.0/24"]; + HAL [address = "10.2.3.0/24"]; + } + +} + + + + + + + + + + + + + + private + 10.1.1.0/24 + "private (subnet)" + + + + internet + + my.awesome.dns.com + + 10.1.1.1 + + Gibson + + 10.1.1.2 + + 10.2.2.0/24 + + Hackbardt + + 10.1.1.3 + + 10.2.3.0/24 + + HAL + diff --git a/static/nixos/tinc/3computers.nwdiag b/src/images/3computers.nwdiag similarity index 100% rename from static/nixos/tinc/3computers.nwdiag rename to src/images/3computers.nwdiag diff --git a/src/images/3computers.png b/src/images/3computers.png new file mode 100644 index 0000000..4becf99 Binary files /dev/null and b/src/images/3computers.png differ diff --git a/src/images/3computers.svg b/src/images/3computers.svg new file mode 100644 index 0000000..528decd --- /dev/null +++ b/src/images/3computers.svg @@ -0,0 +1,55 @@ + + + + + + + + + blockdiag + +nwdiag { + + internet [shape = cloud]; + + internet -- Gibson [address = "my.awesome.dns.com"] + + network private { + address = "10.1.1.0/24"; + + Gibson [address = "10.1.1.1"]; + Hackbardt [address = "10.1.1.2"]; + HAL [address = "10.1.1.3"]; + } + +} + + + + + + + + + + private + 10.1.1.0/24 + + + + internet + + my.awesome.dns.com + + 10.1.1.1 + + Gibson + + 10.1.1.2 + + Hackbardt + + 10.1.1.3 + + HAL + diff --git a/src/lessc/page/main.less b/src/lessc/page/main.less index 6092114..e879eb5 100644 --- a/src/lessc/page/main.less +++ b/src/lessc/page/main.less @@ -94,6 +94,7 @@ table.comparison { } figure { + widows: 98%; margin-top: 1em; margin-bottom: 1em; margin-left: 0;