Skip to content

Commit

Permalink
Run nix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
iFreilicht committed Sep 26, 2024
1 parent 4c4c869 commit 72c867c
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ recursive layouts.
Disko doesn't require installation: it can be run directly from nix-community
repository. The [Quickstart Guide](./docs/quickstart.md) documents how to run
Disko in its simplest form when installing NixOS. Alternatively, you can also
use the new [disko-install](./docs/disko-install.md) tool, which combines `disko` and `nixos-install` into one step.
use the new [disko-install](./docs/disko-install.md) tool, which combines
`disko` and `nixos-install` into one step.

For information on other use cases, including upgrading from an older version of
**disko**, using **disko** without NixOS and downloading the module, see the
Expand Down
15 changes: 9 additions & 6 deletions docs/interactive-vm.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Running Interactive VMs with disko

disko now exports its own flavor of interactive VMs (similiar to config.system.build.vm).
Simply import the disko module and build the vm runner with:
disko now exports its own flavor of interactive VMs (similiar to
config.system.build.vm). Simply import the disko module and build the vm runner
with:

```
nix build -L '.#nixosConfigurations.mymachine.config.system.build.vmWithDisko'
```
Expand All @@ -12,7 +14,8 @@ afterwards you can run the interactive VM with:
result/bin/disko-vm
```

You can configure the VM using the `virtualisation.vmVariantWithDisko` NixOS option:
You can configure the VM using the `virtualisation.vmVariantWithDisko` NixOS
option:

```nix
{
Expand All @@ -24,6 +27,6 @@ You can configure the VM using the `virtualisation.vmVariantWithDisko` NixOS opt
}
```

extraConfig that is set in disko.tests.extraConfig is also applied to the interactive VMs.
imageSize of the VMs will be determined by the imageSize in the disk type in your disko config.
memorySize is set by disko.memSize
extraConfig that is set in disko.tests.extraConfig is also applied to the
interactive VMs. imageSize of the VMs will be determined by the imageSize in the
disk type in your disko config. memorySize is set by disko.memSize
5 changes: 2 additions & 3 deletions lib/types/zpool.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ in
types = {
topology =
let
vdev = lib.types.submodule ({ name, ... }: {
vdev = lib.types.submodule ({ ... }: {
options = {
mode = lib.mkOption {
type = lib.types.enum modeOptions;
Expand All @@ -44,10 +44,9 @@ in
};
};
});
parent = config;
in
lib.types.submodule
({ config, name, ... }: {
({ ... }: {
options = {
type = lib.mkOption {
type = lib.types.enum [ "topology" ];
Expand Down
2 changes: 1 addition & 1 deletion module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ in
Machine configuration to be added for the vm script available at `.system.build.vmWithDisko`.
'';
inherit (vmVariantWithDisko) type;
default = {};
default = { };
visible = "shallow";
};

Expand Down
3 changes: 2 additions & 1 deletion package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ let
mainProgram = finalAttrs.name;
};
});
in self
in
self
4 changes: 1 addition & 3 deletions tests/standalone.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
{ pkgs ? import <nixpkgs> { }, ... }:
(pkgs.nixos [
../example/stand-alone/configuration.nix
{ documentation.enable = false; }
Expand Down

0 comments on commit 72c867c

Please sign in to comment.