From 34e1c624ec04d4aaddc22b07ff9de6186bd6ad0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 17 Sep 2023 10:30:59 +0200 Subject: [PATCH] switch to deno for formatting --- README.md | 2 +- docs/cli.md | 1 - docs/quickstart.md | 10 +++++---- docs/reference.md | 44 ++++++++++++++++++++-------------------- docs/supportmatrix.md | 2 -- treefmt/flake-module.nix | 3 +-- 6 files changed, 30 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 334aa86..ca8740a 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ This software is provided free under the --- This project is supported by [Numtide](https://numtide.com/). - ![Untitledpng](https://codahosted.io/docs/6FCIMTRM0p/blobs/bl-sgSunaXYWX/077f3f9d7d76d6a228a937afa0658292584dedb5b852a8ca370b6c61dabb7872b7f617e603f1793928dc5410c74b3e77af21a89e435fa71a681a868d21fd1f599dd10a647dd855e14043979f1df7956f67c3260c0442e24b34662307204b83ea34de929d) +![Untitledpng](https://codahosted.io/docs/6FCIMTRM0p/blobs/bl-sgSunaXYWX/077f3f9d7d76d6a228a937afa0658292584dedb5b852a8ca370b6c61dabb7872b7f617e603f1793928dc5410c74b3e77af21a89e435fa71a681a868d21fd1f599dd10a647dd855e14043979f1df7956f67c3260c0442e24b34662307204b83ea34de929d) We are a team of independent freelancers that love open source.  We help our customers make their project lifecycles more efficient by: diff --git a/docs/cli.md b/docs/cli.md index 8b441f8..aa07efa 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -14,5 +14,4 @@ Options: use another kexec tarball to bootstrap NixOS * --debug enable debug output - ``` diff --git a/docs/quickstart.md b/docs/quickstart.md index 65abdf1..5fd8fbf 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -46,9 +46,11 @@ below. This command will generate a `flake.nix` file. Modify this file according to your requirements. - - **For a Minimal Setup**: - You can copy and paste the example flake contents available [here](https://github.com/numtide/nixos-anywhere-examples/blob/main/flake.nix). - This example is tailored for a virtual machine setup similar to one on [Hetzner Cloud](https://www.hetzner.com/cloud). + - **For a Minimal Setup**:\ + You can copy and paste the example flake contents available + [here](https://github.com/numtide/nixos-anywhere-examples/blob/main/flake.nix). + This example is tailored for a virtual machine setup similar to one on + [Hetzner Cloud](https://www.hetzner.com/cloud). **Hardware-Specific Configuration**: If you're not using a virtual machine, you'll need to generate a custom hardware configuration with @@ -70,7 +72,7 @@ below. This creates the necessary configuration files under `/mnt/etc/nixos/`, which you can then customize as needed. -3. **Find SSH Key Line**: +3. **Find SSH Key Line**:\ if you cloned [our nixos-anywhere-example](https://github.com/numtide/nixos-anywhere-examples/blob/main/flake.nix) you will also replace the SSH key like this: In your configuration, locate diff --git a/docs/reference.md b/docs/reference.md index 6e8a054..351f2c5 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -68,25 +68,25 @@ This list is not comprehensive. It's possible you may encounter errors that originate from the underlying operating system. These should be documented in the relevant operating system manual. -| Id | Message | Explanation | -| --- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| 1 | Failure unpacking initrd | You don't have enough RAM to hold `kexec` | -| 2 | Flake  does not provide attirbute | The configuration name you specified in your flake URI is not defined as a NixOS configuration in your flake eg if your URI was mydir#myconfig, then myconfig should be included in the flake as `nixosConfigurations.myconfig` | -| 3 | Please specify the name of the NixOS configuration to be installed, as a URI fragment in the flake-uri. | As for error #2 | -| | For example, to use the output nixosConfigurations.foo from the flake.nix, append "#foo" to the flake-uri | | -| 4 | Retrieving host facts via ssh failed. Check with --debug for the root cause, unless you have done so already | TODO: Explain | -| 5 | ssh-host must be set |  has not been supplied | -| 6 | and must be existing store-paths | This occurs if the -s switch has been used to specify the disko script and store path correctly, and the scripts cannot be found at the given URI | -| 7 | flake must be set | This occurs if both the -flake option (use a flake) and the -s option (specify paths directly) have been omitted. Either one or the other must be specified. | -| 8 | no tar command found, but required to unpack kexec tarball | The destination machine does not have a `tar` command available. This is needed to unpack the `kexec`. | -| 9 | no setsid command found, but required to run the kexec script under a new session | The destination machine does not have the `setsid` command available | -| 10 | This script requires Linux as the operating system, but got | The destination machine is not running Linux | -| 11 | The default kexec image only support x86_64 cpus. Checkout https://github.com/numtide/nixos-anywhere/#using-your-own-kexec-image for more information. | By default, `nixos-anywhere` uses its own `kexec` image, which will only run on x86_64 CPUs. For other CPU types, you can use your own `kexec` image instead. Refer to the [How To Guide](./howtos#using-your-own-kexec-image) for instructions. | -| 12 | Please specify the name of the NixOS configuration to be installed, as a URI fragment in the flake-uri. | This is a `disko` error. As for Error #2 | -| | For example, to use the output diskoConfigurations.foo from the flake.nix, append \"#foo\" to the flake-uri. | | -| 13 | mode must be either create, mount or zap_create_mount | This is a `disko` error. The `disko` switches have not been used correctly. This could happen if you supplied your own `disko` script using the -s option | -| 14 | disko config must be an existing file or flake must be set | This is a `disko` error. This will happen if the `disko.devices` entry in your flake doesn't match the name of a file in the same location as your flake. | -| | | | -| | | | -| | | | -| | | | +| Id | Message | Explanation | +| -- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1 | Failure unpacking initrd | You don't have enough RAM to hold `kexec` | +| 2 | Flake  does not provide attirbute | The configuration name you specified in your flake URI is not defined as a NixOS configuration in your flake eg if your URI was mydir#myconfig, then myconfig should be included in the flake as `nixosConfigurations.myconfig` | +| 3 | Please specify the name of the NixOS configuration to be installed, as a URI fragment in the flake-uri. | As for error #2 | +| | For example, to use the output nixosConfigurations.foo from the flake.nix, append "#foo" to the flake-uri | | +| 4 | Retrieving host facts via ssh failed. Check with --debug for the root cause, unless you have done so already | TODO: Explain | +| 5 | ssh-host must be set |  has not been supplied | +| 6 | and must be existing store-paths | This occurs if the -s switch has been used to specify the disko script and store path correctly, and the scripts cannot be found at the given URI | +| 7 | flake must be set | This occurs if both the -flake option (use a flake) and the -s option (specify paths directly) have been omitted. Either one or the other must be specified. | +| 8 | no tar command found, but required to unpack kexec tarball | The destination machine does not have a `tar` command available. This is needed to unpack the `kexec`. | +| 9 | no setsid command found, but required to run the kexec script under a new session | The destination machine does not have the `setsid` command available | +| 10 | This script requires Linux as the operating system, but got | The destination machine is not running Linux | +| 11 | The default kexec image only support x86_64 cpus. Checkout https://github.com/numtide/nixos-anywhere/#using-your-own-kexec-image for more information. | By default, `nixos-anywhere` uses its own `kexec` image, which will only run on x86_64 CPUs. For other CPU types, you can use your own `kexec` image instead. Refer to the [How To Guide](./howtos#using-your-own-kexec-image) for instructions. | +| 12 | Please specify the name of the NixOS configuration to be installed, as a URI fragment in the flake-uri. | This is a `disko` error. As for Error #2 | +| | For example, to use the output diskoConfigurations.foo from the flake.nix, append \"#foo\" to the flake-uri. | | +| 13 | mode must be either create, mount or zap_create_mount | This is a `disko` error. The `disko` switches have not been used correctly. This could happen if you supplied your own `disko` script using the -s option | +| 14 | disko config must be an existing file or flake must be set | This is a `disko` error. This will happen if the `disko.devices` entry in your flake doesn't match the name of a file in the same location as your flake. | +| | | | +| | | | +| | | | +| | | | diff --git a/docs/supportmatrix.md b/docs/supportmatrix.md index 73ee45f..1fa4b23 100644 --- a/docs/supportmatrix.md +++ b/docs/supportmatrix.md @@ -26,5 +26,3 @@ listed below. | | | | | | | | | | | | | | | | | | - -## diff --git a/treefmt/flake-module.nix b/treefmt/flake-module.nix index e7279d7..4c793d3 100644 --- a/treefmt/flake-module.nix +++ b/treefmt/flake-module.nix @@ -9,8 +9,7 @@ programs.nixpkgs-fmt.enable = true; programs.shellcheck.enable = true; programs.shfmt.enable = true; - programs.prettier.enable = true; - settings.formatter.prettier.options = [ "--prose-wrap" "always" ]; + programs.deno.enable = true; settings.formatter.shellcheck.options = [ "-s" "bash" ]; }; formatter = config.treefmt.build.wrapper;