Fmp: Add shfmt.

This commit is contained in:
Dmitry Voronin 2024-12-18 09:46:54 +03:00
parent 6817451032
commit 4bcedc1a2e
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
3 changed files with 8 additions and 2 deletions

View file

@ -14,3 +14,8 @@ excludes = [
command = "nixfmt"
options = [ "-s" ]
includes = [ "*.nix" ]
[formatter.shfmt]
command = "shfmt"
options = [ "-s", "-w" ]
includes = [ "*.sh" ]

View file

@ -6,7 +6,7 @@ cfg="$(realpath .)"
target="${1}"
host="${2}"
if [[ "${target}" = "" ]]; then
if [[ ${target} == "" ]]; then
printf "Usage: ./.Bootstrap.sh <DRIVE> [HOST]\n"
exit 2
fi
@ -33,7 +33,7 @@ nixos-generate-config --root /mnt
# Install.
cd /mnt
if [[ "${host}" = "" ]]; then
if [[ ${host} == "" ]]; then
printf "Warning: Installing basic system.\n"
nixos-install
else

View file

@ -156,6 +156,7 @@
nativeBuildInputs = with pkgs; [
nixd
nixfmt-rfc-style
shfmt
treefmt
];
# buildInputs = with pkgs; [ ];