Skip to content

Plommonsorbet/nix-mikrotik

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nix Mikrotik

The goal of this project is to create a way to manage Mikrotik RouterOS routers using nix.

I’m not an expert with nix and I have no idea about how to go about creating a new nix project from scratch, so this project is a learning project.

Very happy to have people get involved in this, Ideas / suggestions / PRs are welcome! You can reach me through github issues / PRs or on email [email protected].

Setup

The usage of this project currently is very basic and something to be improved.

Download the repository

git clone https://github.com/Plommonsorbet/nix-mikrotik
cd nix-mikrotik

Example usage

Generate RouterOS configuration for examples/configuration.nix

nix-build mikrotik.nix

Generate RouterOS configuration for your own config.

nix-build mikrotik.nix --arg mikrotik-config ./my-config.nix

Contributing

Goals

Mikrotik config(.rsc) parser

This is to be able to parse default router config for your router model or your current configuration setup as a starting point when migrating.

Deployment tool

Build a tool for deploying this configuration to devices similar to nixops or morph.

Diff tool

Create a diff tool to compare a test build with the active device config.

In the meanwhile a dirty script to just pull the build config and export the config from a device and run the binary diff would be a start. But I want to have to eventually build a system that is a bit smarter and can compare each configuration object. However this would need a parser before it can be done.

Testing

Some kind of testing that it works. This could be done against a vm running specific versions of RouterOS.

Good Static Analysis

The config that is generated should be verified with assertions and network relevant types to minimize the risk of a bad config being generated.

This is especially important since routers are so essential and a small mistake could be catastrophic.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published