22 Commits
Author SHA1 Message Date
Jörg ThalheimandJörg Thalheim a19c2b6d3a tests: use nixpkgs qemu-common for proper machine type configuration
QEMU on aarch64 requires an explicit machine type (e.g., '-machine virt'),
unlike x86_64 which has a default. Previously, the test script hardcoded
'qemu-kvm' without machine type arguments, causing aarch64 tests to fail
with "No machine specified, and there is no default".

By importing and using nixpkgs' qemu-common.nix library, we reuse the
existing platform-specific QEMU configuration logic.
2025-11-20 13:42:11 +00:00
DavHauandlassulus ff2d853a84 treewide: format all files 2025-02-15 10:08:56 +00:00
Andrew MarshallandFelix Uhl 3979285062 treewide: Fix using pkgs.{build,host}Platform alias
This was recently changed in nixpkgs to be an alias; if nixpkgs is
configured to disable aliases, this usage will fail.
2024-10-29 09:32:41 +01:00
Jörg Thalheimandmergify[bot] 6388d2859c find more broken riscv64 tests 2023-08-14 07:59:55 +00:00
Jörg Thalheimandmergify[bot] 358b87fd44 make tests risv64 compatible 2023-08-13 18:30:15 +00:00
lassulusandmergify[bot] 0725574ad8 move standalone test to separate file 2023-08-10 12:18:39 +00:00
lassulusandmergify[bot] 04e227bab7 tests: pass diskoLib instead of makeDiskoTest 2023-07-28 12:43:42 +00:00
lassulusandmergify[bot] 715c211dd7 testLib.makeDiskoTest: split extraConfig into nixos-config, extraSystemConfig & extraInstallerConfig 2023-07-19 19:07:40 +00:00
lassulusandmergify[bot] 056637d3c9 move tests/lib.nix into diskoLib.testLib 2023-07-19 19:07:40 +00:00
Jörg Thalheim a8d85d9f89 apply deadnix 2023-06-06 13:32:47 +02:00
lassulus 769bde0834 turn disk configs into valid nixos configuration 2023-04-06 08:56:55 +02:00
Lily Fosterandlassulus 0accdf4e20 types,module,tests: run shellcheck on scripts before running them in NixOS tests 2023-02-14 09:07:13 +01:00
Chris Scutcher ff5127ea0a style: Re-apply style normalisation
Originally this was manually applied with;

```sh
nixpkgs-fmt **.nix && statix fix
```

but I overlooked the fact that `**.nix` would only expand to files in
the root (I should have used `**/*.nix`).

Previous commit adds `nix fmt` support which passes `.` to `nixpkgs-fmt`
(if no other path is explicitly specified when running `nix fmt`).

This commit includes the changes made by running `nix fmt`.
2023-02-07 15:56:08 +00:00
Chris Scutcher 4ba8181319 style: Disable inherit pattern check in statix
As discussed in [this
comment](https://github.com/nix-community/disko/pull/143#discussion_r1097912402),
as a blanket rule converting everything possible to `inherit` like
statements can hurt readability.

Add config file for statix to disable these checks and fixes, then rerun
the autofix with these options.
2023-02-07 15:37:12 +00:00
Chris Scutcher 08435eec4b style: Apply nixpkgs-fmt and fix
Apply standard formatting and some statix conventions using;

```sh
nixpkgs-fmt **.nix && statix fix .
```

With the intent of making contribution a bit easier and reducing mental
load in hand formatting (in the same vein as [black]).

[black]: https://github.com/psf/black#the-uncompromising-code-formatter
2023-02-06 14:24:34 +00:00
lassulus 4ce2aa4845 tests swap: add jq to system 2022-12-24 12:13:04 +01:00
lassulus 9f7f23abdb add nixos tests for disko.config, extend/fix existing tests 2022-10-02 16:41:02 +02:00
Jörg Thalheim 68f950bf20 add test for standalone nixos config 2022-09-04 13:09:10 +02:00
Jörg Thalheim 65bd5a97f8 add test for lvm example 2022-09-04 12:52:19 +02:00
Jörg Thalheim 69f1337980 fix inconsistent indentation with nixpkgs-fmt 2022-08-26 08:41:58 +02:00
lassulus 1ac0e76b15 tests: add lib, autoimport tests 2022-08-25 23:31:05 +02:00
lassulus 0ffaac7913 run all tests on ci 2022-08-25 23:31:05 +02:00