Coder Social home page Coder Social logo

oddlama / nix-topology Goto Github PK

View Code? Open in Web Editor NEW
369.0 9.0 12.0 1.69 MB

🍁 Generate infrastructure and network diagrams directly from your NixOS configurations

Home Page: https://oddlama.github.io/nix-topology

License: MIT License

Nix 84.93% JavaScript 15.07%
architecture diagram diagram-generator flake nix nix-flake nixos topology

nix-topology's People

Contributors

clhodapp avatar hauskens avatar iogamaster avatar jayrovacsek avatar nikitawootten avatar oddlama avatar supersandro2000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nix-topology's Issues

run script to perform computation on extracted values

Working on an extractor for the networking.wireguard module of NixOS, there is something that IΒ don't quite know how to do:
I would like to be able to extract each networking.wireguard.interfaces public key. I was hoping to be able to somehow run the following script cat ${interface.privateKeyFile} | ${getExe pkgs.wg} pubkey, but it's unclear how, or even if nix-topology currently permits something like this.

Services no longer renders

I noticed that latest version builds fine, but it does not render services anymore.

Service overview is empty
image

Servers and their interfaces seems to render fine, but none of the services on them are rendered.
image

Tunneled connections

I would like to create a topology of a Point-to-Site network. A simplified version of Fig 3.2 described here: https://www.procustodibus.com/blog/2020/10/wireguard-topologies/#point-to-site

This is what I have currently:
main

So it's not that far from what I would like to have. But I'm missing 2 things to make it more accurate:

  1. Specify that wg0 is routed inside another network between some hosts (middleware and hosts 1-3).
  2. A (tunneled) connection that is routed over the internet (maybe this is already possible?)

I also have an idea for styling tunneled connections:

  • Duplicate the <path> of the connection
  • Increase the stroke-width of the first path and set stroke-opacity="0.5"
- <path fill="none" stroke="#f1cf8a" stroke-width="2" d="M955.6 524.2h211.6m-211.6 0h93.6a5 5 0 0 1 5 5v150a5 5 0 0 0 5 5h108m-211.6-160h93.6a5 5 0 0 0 5-5v-150a5 5 0 0 1 5-5h108"/>
+ <path fill="none" stroke="#f1cf8a" stroke-width="8" stroke-opacity="0.5" d="M955.6 524.2h211.6m-211.6 0h93.6a5 5 0 0 1 5 5v150a5 5 0 0 0 5 5h108m-211.6-160h93.6a5 5 0 0 0 5-5v-150a5 5 0 0 1 5-5h108"/>
+ <path fill="none" stroke="#70a5eb" stroke-width="2" d="M955.6 524.2h211.6m-211.6 0h93.6a5 5 0 0 1 5 5v150a5 5 0 0 0 5 5h108m-211.6-160h93.6a5 5 0 0 0 5-5v-150a5 5 0 0 1 5-5h108"/>

Then it would look like
main-modified

It's still not there yet, because it's not really visible that the connection is wg0 via enp7s0 <=> enp7s0 to wg0 but maybe we could just write it like wg0 via enp7s0.

Would this be possible without to much work?

Icon for Fiber Connection

Really cool project!

It's a tiny thing but it would be cool if there were a built-in icon to represent a fiber connection.

I'm curious whether you made the icons yourself or pulled them from a pre-made collection that might already contain such an icon.

Per-System Config Generation

Within the README TODO section, visualising features such as disko and impermenance are noted; does the project have a pathway already considered to visualising those functionalities that could be contributed to by the community if desired?

A few questions that might already be considered:

  • where would these be rendered?
  • would this space open up further visualisation of host configration options that aren't classical services as are currently rendered? (e.g systemd services visualisation, DE/WM visualisation, boot opinions such as systemd/grub/uboot)

Thanks in advance!

Contributing Guidance

Hi there, firstly; this looks awesome - I'm extremely keen to utilise it in my configurations πŸ˜„
In documentation there is instances you mention that PRs are welcome; could you clarify any preferences you would have around:

  • commit style (if required such as conventional commits or alike)
  • code style enforcement / lint application (noting statix configuration file)
  • separating commits per change into a commit each (such as is expected in nixpkgs or alike)
  • any services you wouldn't accept into the repo (regarding extractors)

Thanks in advance!

Consolidation of Services Overview

Is there any objection to the project considering a consolidation of the services overview rendered in the main.svg output?
I've got two options that could be considered below;

Minimise Current Output (replace behaviour)

I propose we could shift from the current view to one in which all hosts running the same service are listed under the service and details or info elements are visible only in the per-host card to reduce information on the one screen

First example of current view:
20240420_08h16m59s_grim

Compared to a proposed:
20240420_08h16m59s_grim_proposed

Second example of current view (that includes elements of detailed information):
20240420_08h17m19s_grim

Compared to a proposed:
20240420_08h17m19s_grim_proposed

Add Minimised Output (extend behaviour)

I propose we could apply the above option, however output the contents not over main.svg but in a minimal.svg or alike - upside of-course is non-breaking behaviour, however it might lead to increased eval/build times if issues such as #6 are caused by the number and size of images.

An addendum to increasing the default outputs could be increased drv options to build from; such as:

nix build .\#topology.x86_64-linux.config.output
# vs
nix build .\#topology.x86_64-linux.config.minimal-output
# or 
nix build .\#topology.x86_64-linux.config.output.passthru.minimal

Thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.