switch to deno for formatting

This commit is contained in:
Jörg Thalheim 2023-09-17 10:30:59 +02:00 committed by mergify[bot]
parent 753da6063a
commit 34e1c624ec
6 changed files with 30 additions and 32 deletions

View File

@ -115,7 +115,7 @@ This software is provided free under the
--- ---
This project is supported by [Numtide](https://numtide.com/). 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 We are a team of independent freelancers that love open source.  We help our
customers make their project lifecycles more efficient by: customers make their project lifecycles more efficient by:

View File

@ -14,5 +14,4 @@ Options:
use another kexec tarball to bootstrap NixOS use another kexec tarball to bootstrap NixOS
* --debug * --debug
enable debug output enable debug output
``` ```

View File

@ -46,9 +46,11 @@ below.
This command will generate a `flake.nix` file. Modify this file according to This command will generate a `flake.nix` file. Modify this file according to
your requirements. your requirements.
- **For a Minimal Setup**: - **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). You can copy and paste the example flake contents available
This example is tailored for a virtual machine setup similar to one on [Hetzner Cloud](https://www.hetzner.com/cloud). [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, **Hardware-Specific Configuration**: If you're not using a virtual machine,
you'll need to generate a custom hardware configuration with 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 This creates the necessary configuration files under `/mnt/etc/nixos/`, which
you can then customize as needed. you can then customize as needed.
3. **Find SSH Key Line**: 3. **Find SSH Key Line**:\
if you cloned if you cloned
[our nixos-anywhere-example](https://github.com/numtide/nixos-anywhere-examples/blob/main/flake.nix) [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 you will also replace the SSH key like this: In your configuration, locate

View File

@ -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 originate from the underlying operating system. These should be documented in
the relevant operating system manual. the relevant operating system manual.
| Id | Message | Explanation | | Id | Message | Explanation |
| --- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | -- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 1 | Failure unpacking initrd | You don't have enough RAM to hold `kexec` | | 1 | Failure unpacking initrd | You don't have enough RAM to hold `kexec` |
| 2 | Flake <flake_url> 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` | | 2 | Flake <flake_url> 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 | | 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 | | | | 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 | | 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 | <ip_address> has not been supplied | | 5 | ssh-host must be set | <ip_address> has not been supplied |
| 6 | <disko_script> and <nixos_system> 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 | | 6 | <disko_script> and <nixos_system> 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. | | 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`. | | 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 | | 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 <operating system> | The destination machine is not running Linux | | 10 | This script requires Linux as the operating system, but got <operating system> | 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. | | 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 | | 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. | | | | 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 | | 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. | | 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. |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |

View File

@ -26,5 +26,3 @@ listed below.
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
##

View File

@ -9,8 +9,7 @@
programs.nixpkgs-fmt.enable = true; programs.nixpkgs-fmt.enable = true;
programs.shellcheck.enable = true; programs.shellcheck.enable = true;
programs.shfmt.enable = true; programs.shfmt.enable = true;
programs.prettier.enable = true; programs.deno.enable = true;
settings.formatter.prettier.options = [ "--prose-wrap" "always" ];
settings.formatter.shellcheck.options = [ "-s" "bash" ]; settings.formatter.shellcheck.options = [ "-s" "bash" ];
}; };
formatter = config.treefmt.build.wrapper; formatter = config.treefmt.build.wrapper;