Skip to content

water-sucks/nixos

Repository files navigation

nixos

A unified NixOS management tool.

Introduction

This is a unification of all the different pick NixOS tooling into one executable. NixOS has its various tools spread out between several large scripts that have become on the verge of unmaintainable. This tool has one goal: to create a modular NixOS CLI that mirrors or enhances the functionality of all current NixOS tooling in nixpkgs, adds on to it if needed, and eventually come to replace it entirely.

  • nixos-rebuildnixos apply + nixos generation
  • nixos-enternixos enter
  • nixos-generate-confignixos init
  • nixos-versionnixos info
  • nixos-installnixos install
  • nixos-infonixos manual

More to come in the future, see TODO for a list of commands that are planned to be implemented.

Usage

Use this repo as a flake input. A NixOS module is also provided, and this is the recommended way to use this program.

{
  inputs.nixos-cli.url = "github:water-sucks/nixos";

  outputs = { nixpkgs, nixos-cli, ... }: {
    nixosConfigurations.system-name = nixpkgs.lib.nixosSystem {
      modules = [
        nixos-cli.nixosModules.nixos-cli
        # other configuration goes here
      ];
    };
  };
}

Configuration

This can be configured using the NixOS module (the preferred way), which generates a file at /etc/nixos-cli/config.json. I would prefer using TOML at some point, but for right now JSON is the file format I can get up and running with the fastest.

TODO

Implemented Commands/Flags

  • apply
  • container
    • list
    • create <name>
    • destroy <name>
    • start <name>
    • stop <name>
    • status <name>
    • update <name>
    • login <name>
    • run <name> <args...>
    • show-ip <name>
    • show-host-key <name>
  • enter
  • info
  • init
  • install
  • generation
    • list
    • switch <number>
    • rollback
    • diff (a la nvd)
  • manual
  • option
  • repl

Possible Future Commands

I would like for this to become a standard NixOS tool, which means that I want to cater to potentially many interests. If you would like for any subcommands to be implemented that you think fit this project, please file an issue.

About

A unified NixOS tooling replacement for nixos-* utilities

Resources

License

Stars

Watchers

Forks

Packages

No packages published