Morlana: nix-darwin utilities, implemented in Rust

nix-darwin utilities, implemented in Rust; replaces the functionality of darwin-{rebuild,installer,uninstaller}

  • Built-in nix-output-monitor and nvd support
  • Confirmation prompts for important actions
  • Works as a standalone binary
  • Flakes-first (does not work with channels setups at the moment)
  • More aesthetic logging
  • Improved uninstaller logic (e.g. recovers .before-nix-darwin files)
nix run github:ryanccn/morlana
4 Likes

Very nice tool indeed! Thanks for sharing.

Just to add to the instructions this is how I added morlana to my existing flake with home manager:

  1. Add flake to inputs:
inputs.morlana.url = "github:ryanccn/morlana";
  1. Add overlay to darwinConfiguration:
darwinConfigurations.something = darwin.lib.darwinSystem (let
  system = "aarch64-darwin";
  specialArgs = inputs;
in {
  inherit system specialArgs;
  modules = [
    # ...
    home-manager.darwinModules.home-manager
    {
      nixpkgs.overlays = [
        # ...
        inputs.morlana.overlays.default
      ];
      # ...
    }
  ];
});
  1. Install package somewhere (here through home manager, but can be through system packages too):
home.packages = with pkgs;
    [
        # other nix packages
    ]
    ++ (if pkgs.stdenv.isDarwin then [ pkgs.morlana ] else [ ]);

P.S. Having a home manager program with pre-configured shell completions would also be nice :slight_smile:

If I’m not very much mistaken, the package should already come with shell completions for bash, zsh, and fish :upside_down_face:

You’re right, it already does :slight_smile:

1 Like