Skip to content

dcbaker/nm2nix

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NetworkManager to Nix

This is a really dumb script that converts every .nmconnection file in the current directory to the nix code that is expected by networking.networkmanager.ensure-profiles.profiles which was introduced in NixOS/nixpkgs/#254647 You will have to do some manual escaping for connection names with special characters

You probably want to run this script in /etc/NetworkManager/system-connections/ (default profile storage) or /run/NetworkManager/system-connections (temporary profile storage) both of the folders are only readable by the root user so you need to execute the script with root permissions aka sudo. For more details about the locations feel free to read redhat's docs

If you just want to run the script do:

sudo su -c "cd /etc/NetworkManager/system-connections && nix --extra-experimental-features 'nix-command flakes' run github:Janik-Haag/nm2nix"

About

Converts .nmconnection files into nix code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 60.2%
  • Nix 39.8%