Commit Graph

41 Commits

Author SHA1 Message Date
matthewcroughan
23c63fb093 module: fix typo pkgs -> lib 2024-05-22 16:09:32 +00:00
matthewcroughan
4444751300 make-disk-image: make extraPostVM configurable from module.nix 2024-05-19 14:38:05 +01:00
fricklerhandwerk
2890a8c922 fix broken fallback
fixes an error when using this minimal configuration:

```nix
let
  pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11") { };
  disko = fetchTarball "https://github.com/nix-community/disko/tarball/master";
in
pkgs.nixos {
  imports = [
    "${disko}/module.nix"
    "${disko}/example/hybrid.nix"
  ];
}
```

when running:

```console
$ nix-build
...
error: 'default' at /nix/store/y981rwszq9yi36rvvz2vrr6hb22si0hc-source/lib/default.nix:391:23 called with unexpected argument 'system'
```
2023-12-24 18:44:46 +01:00
matthewcroughan
4c4634bbcb make-disk-image: allow extra dependencies to be passed into image builder 2023-12-14 14:24:37 +00:00
matthewcroughan
bb75ad0b1d make-disk-image: inherit kernel from nixosConfiguration 2023-12-14 14:05:13 +00:00
matthewcroughan
bd8fbc3f27 make-disk-image: make memSize configurable per disk
Sometimes the VM builder can run out of memory and fail to allocate memory when installing the system toplevel
2023-12-13 15:02:45 +00:00
Maximilian Bosch
6ad5c9c17c module: use defaultText to not depend on the configuration when building the manual
I do build my workstation with `documentation.nixos.includeAllModules`
to also have private modules and external stuff in my local options'
reference.

Not sure why exactly this breaks with

    error: attribute 'loader' missing

    at /nix/store/h6qicay9fgggx9nf6apdl6zkdpdp28xx-source/module.nix:46:19:

        45|         type = lib.types.bool;
        46|         default = config.boot.loader.systemd-boot.enable || config.boot.loader.grub.efiSupport;
          |                   ^
        47|       };

but using defaultText is the usual fix that also works here.
2023-10-13 20:57:40 +00:00
lassulus
9f29cedac7 rename makeDiskImage -> makeDiskImages 2023-09-18 12:16:33 +00:00
lassulus
56e6cad143 module: add images to system.build 2023-09-18 12:16:33 +00:00
Jörg Thalheim
9ab96378f8 reformat tree 2023-09-17 04:43:25 +00:00
lassulus
f9907fcf6d module: add extraTestConfig 2023-09-09 13:32:33 +00:00
lassulus
dd5cdd852c module: add tests.extraChecks 2023-09-02 10:14:48 +00:00
lassulus
d53cd437d3 module: fix legacy aliases 2023-08-31 10:00:56 +00:00
Jörg Thalheim
b32f0e2876 apply treefmt 2023-08-11 08:45:46 +00:00
a-kenji
4015740375 fix: typos 2023-07-30 17:43:54 +00:00
lassulus
1ddcff717c module: pass makeTest and eval-config to diskoLib 2023-07-20 21:32:53 +02:00
lassulus
4cad47f3fa module: expose diskoTest via system.build 2023-07-20 18:43:30 +02:00
lassulus
cdaff66b57 lib: refactor outputs into toplevel 2023-07-19 19:07:40 +00:00
lassulus
1e7098ee04 diskoScript: add bash to PATH 2023-06-24 09:19:17 +00:00
lassulus
8e50c6da0d diskoNoDeps -> diskoScriptNoDeps 2023-06-24 09:19:17 +00:00
lassulus
4dd2d14596 module: add better trace warning 2023-05-30 10:42:12 +02:00
lassulus
12662956d1 module: add diskoScript output, deprecated disko output 2023-05-21 15:39:00 +02:00
lassulus
28d4e71950 cli: consume diskoConfigurations or nixosConfigurations disko configs 2023-05-21 14:04:34 +02:00
lassulus
22b33a4fd6 types: refactor into diskoLib 2023-05-20 13:56:42 +02:00
Lily Foster
0accdf4e20 types,module,tests: run shellcheck on scripts before running them in NixOS tests 2023-02-14 09:07:13 +01: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
Jörg Thalheim
48e4c06004 split disko type into multiple files 2023-01-29 08:10:33 +01:00
lassulus
af2da574be add support for another mountpoint than /mnt 2023-01-28 18:08:31 +01:00
phaer
dfd7ee9590 module: dash -> bash 2023-01-19 13:07:31 +01:00
Tristan Ross
809f92cd25 feat: add the descriptions for the options 2023-01-03 10:52:57 -08:00
lassulus
df3a607ad7 fix: module: define only if devices are given 2022-12-27 18:48:21 +01:00
lassulus
f7445ae739 module: define only if devices are given 2022-12-25 21:21:40 +01:00
lassulus
192f9cc416 scripts: append old $PATH for destroying 2022-12-24 12:13:04 +01:00
David Arnold
efc80d7d89 types: init swap 2022-12-02 08:09:37 +01:00
Jörg Thalheim
67f991e2bc drop environment.systemPackages
Those packages are only used for installation and are not used
afterwards. system.build outputs can be used to get them in an installer
included.
2022-11-29 15:00:25 +01:00
Jörg Thalheim
6c3e0d22e4 remove dependency on bash 2022-11-29 13:08:24 +01:00
Jörg Thalheim
fb771318d1 add disko output variant without package list
for netboot or kexec based installer we may want to avoid uploading too
many dependencies because the target could go out-of-memory.
2022-11-27 16:50:46 +01:00
Jörg Thalheim
6bbdafce48 zapCreateMount: stop mdraids 2022-11-25 17:36:40 +01:00
lassulus
7a4c85b53e module: put disko scripts in system.build for better reference 2022-11-25 17:36:40 +01:00
lassulus
4184cbcd03 add module 2022-10-29 13:23:31 +02:00