From eb36b8bbd62d4bf47ecdd952b38f9fdc2678d9cc Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Tue, 3 Jan 2023 10:50:00 +0530 Subject: [PATCH] add ', fmt' --- README.md | 3 ++- lib.nix | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 84b7a07..2945aba 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ nix develop -c , activate - Clone this repo at `/etc/nixos` - Edit `flake.nix` to use your system hostname in the `nixosConfigurations` set - Edit `users/config.nix` to contain your users - - Run `nix develop -c , activate`. That's it. Re-open your shell. + - Run `nix develop -c , activate`. That's it. Re-open your terminal. - macOS: - Install Nix normally (multi-user) - Install [nix-darwin](https://github.com/LnL7/nix-darwin) @@ -41,6 +41,7 @@ nix develop -c , activate ## Tips +- Run `,` in `nix develop` shell (tip: direnv better) to see available scripts. - To update NixOS (and other inputs) run `nix flake update` - You may also update a subset of inputs, e.g. ```sh-session diff --git a/lib.nix b/lib.nix index e300bbe..af9c0bd 100644 --- a/lib.nix +++ b/lib.nix @@ -83,6 +83,12 @@ '' ${lib.getExe pkgs.nixos-rebuild} --use-remote-sudo switch -j auto ''; + category = "Main"; + }; + + fmt = { + description = "Autoformat repo tree"; + exec = "nix fmt"; }; }; };