Skip to content

noblepayne/pretty-switch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pretty-switch

A shell script wrapper that uses nix-output-monitor to build NixOS configurations with pretty output. It's a drop-in replacement for nixos-rebuild with enhanced build visualization.

Note: Currently only supports flake-based NixOS systems. PRs welcome for non-flake support.

Usage

pretty-switch [nixos-rebuild-command]
  • Runs nixos-rebuild with nix-output-monitor for prettier output
  • Default command: switch
  • Example: pretty-switch test to test config

How It Works

  1. Uses nix-output-monitor to build the NixOS configuration for the current system
  2. Uses nixos-rebuild to apply the configuration

Installation

  1. Add the flake to your inputs:

    {
      inputs = {
        nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
        pretty-switch.url = "github:noblepayne/pretty-switch";
        pretty-switch.inputs.nixpkgs.follows = "nixpkgs";
      };
    }
  2. Import the NixOS module:

    {inputs, ...}: {
      imports = [inputs.pretty-switch.nixosModules.default];
    }

    This can be done at the flake level or within your configuration.

  3. Rebuild system:

    nixos-rebuild switch --flake .#

Usage

# Build with pretty output
pretty-switch

# Build and test
pretty-switch test

About

hacky wrapper over nix-output-monitor

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages