feat: nih format

This commit is contained in:
Gustavo "Guz" L. de Mello
2024-04-10 13:11:46 -03:00
parent 0758323a5e
commit 69c5ca2bd7

View File

@@ -234,6 +234,16 @@ function nih-sync() {
popd
}
function nih-format() {
local flake_dir="$1"
gum log --structured --prefix "nih format" --level info 'Formatting NixOS config files'
util-format 'nix format' $flake_dir
gum log --structured --prefix "nih format" --level info 'NixOS config files formatted'
}
case "$1" in
"edit") nih-edit $flake_dir $host ;;
"switch" | "build") nih-switch $flake_dir $host ;;