self here is referring to the flake self, you may need to pass it using specialArgs or define your NixOS installer configuration in the flake.nix itself to get direct access to the self flake variable.
Could someone clarify how do I do that, please?
I opened an issue but the maintainer doesn’t seem very responsive:
{
nixosConfigurations.your-machine = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {inherit self;};
modules = [
{
# TODO: add your NixOS configuration here, don't forget your hardware-configuration.nix as well!
boot.loader.systemd-boot.enable = true;
imports = [ self.inputs.disko.nixosModules.disko ];
disko.devices = {
disk = {
vdb = {
device = "/dev/disk/by-id/some-disk-id";
type = "disk";
content = {
type = "gpt";
partitions = {
ESP = {
type = "EF00";
size = "500M";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
}
];
};
}
Personally I’d break out the disko configuration into a separate file though. I should do a NixOS book on NixOS configuration architecture at some point.
The same effect as @TLATER showed, just re-organized a bit.
@TLATER - you should definitely write that book on NixOS configuration! It’s overwhelming as a newcomer how many different ways there are to organize. Especially when your grasp of the Nix language is shaky at best!
Seems I got an error: infinite recursion encountered after adding the separated configuration, could you have a look?
I’m not sure if I’m doing everything right:
The issues you linked to indicate that you got responses on the first day by one of the maintainers in each case; considering that’s all volunteer work, I am not sure it’s fair to qualify this as “without any support”.
There was some support, sure, and I appreciate it.
But it’s not enough at all.
I’m spending enormous amount of time without even moving forward a bit, obviously I just misunderstanding some things, I’m trying hard but I need help.
It’s not my fault the documentation is bad and inconsistent.
It’s something I could help with eventually but first I need to get some success with my efforts.