disko
disko copied to clipboard
Importing disko from inputs in the same file than the disk configuration throw an error
Importing disko module directly in the disko formating file throw the error function anonymous lambda called without required argument inputs
{
imports = [ inputs.disko.nixosModules.disko ];
disko.devices = {…};
}```
inputs is not defined, you need to pass it somehow from your flake.nix. maybe with specialArgs?
yhea sorry it is defined and imported i copy the code fast and forget to show it
imports = [ inputs.disko.nixosModules.disko ];
disko.devices = {…};
}
But the next process works perfectly, where ./disk.nix is the disko configuration
{config, lib, pkgs, inputs, outputs, ...}:
{
imports = [
./hardware-configuration.nix
inputs.disko.nixosModules.disko
./disk.nix
./encrypted-ephemeral-btrfs.nix
./impermanence.nix
./users.nix
./fish.nix
./wireless.nix
./openssh.nix
./sops.nix
];
}
I'm not really following, it seems like you try to access inputs somewhere, where it is not defined. I can help you if you paste more of your config I guess.
You can find my config, the file is nixos/encrypted-ephemeral-btrfs.nix here
I saw your config. You used disko under flakes, and there has a params from outside, so you should run command with --flake ....
https://github.com/Simon-Kenn/nixOs-sample/blob/35173d5f5c4da5f43cb59e09d787247fb7e500a0/README.md?plain=1#L24
Have a try :
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko --flake /path/to/nixOs-sample
You can find my config, the file is nixos/encrypted-ephemeral-btrfs.nix here
As there's been no activity for a long time and this doesn't seem to be an issue with disko itself, I'll close this issue for now. If you get back to this and find you're still having issues, feel free to re-open it.
If you're not the OP and have a similar issue, feel free to open a new issue and reference this one :)