| 27 Apr 2025 |
parismagpie | But with disko, i'm getting some error :
error: The option `virtualisation.vmVariantWithDisko.virtualisation.fileSystems."/etc/secrets".fsType' has conflicting definition values:
- In `/nix/store/hzaj4d6ari2wq2cbg1j60n9zw42gnshy-source/nixos/modules/virtualisation/qemu-vm.nix': "9p"
- In `/nix/store/7wf9q0mb1i43x9dr1qlyfaraq15n6sii-source/lib/interactive-vm.nix': "ext4"
Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions.
I believe this is because the disko vm image actually respects my partitions formats, but that's a bit of a problem for my specific usecase. I can remove the /etc/secrets partition definition in disko, and it works, but do I have any other option ?
| 16:21:57 |
tcurdt | I am a little lost trying to get disko working in this setup https://github.com/tcurdt/nixos-hetzner/blob/main/install-nixos.sh
error: attribute 'createScript' missing
at /nix/store/5dgq6q4jilxz6aipvhr24jsbzhvgy4zx-disko/share/disko/cli.nix:65:7:
64| else if (lib.traceValSeq hasDiskoModuleFlake) then
65| (builtins.getFlake flake).nixosConfigurations.${flakeAttr}.config.system.build.${diskoAttr}
| ^
66| else
| 17:52:49 |
tcurdt | That's when I use v1.9.0 ... latest gives a different error | 17:53:12 |
tcurdt | But I am also confused why there can be a version mismatch when I used "latest" instead. | 17:54:43 |
tcurdt | Any pointers much appreciated. | 17:55:03 |
tcurdt | echo 'Error: Attribute `nixosConfigurations.base.config.system.build.createScript` >&2
echo ' not found in flake
I don't see that attribute set in the example config
https://github.com/Lassulus/flakes-testing/blob/master/flake.nix
What am I missing?
| 18:13:45 |
| redesign your logo changed their display name from SS Bullshit Dreams to nowhere to SS Bullshit Dreams to Nowhere. | 18:30:46 |
@realhotgirlshit:envs.net | Do you happen to know of the BIOS equivalent? My desktop is a little bit older | 22:26:20 |
@realhotgirlshit:envs.net | Okay, now I get it to boot up but it doesn’t unlock the disk saying:
error: disk: 'cryptouuid/…' not fond.
I’m going to check the paths in my config. | 23:09:38 |
tcurdt | finally got it working ...and created a github issue asking for a better error message and a PR to fix the current one | 23:40:20 |
| 28 Apr 2025 |
@realhotgirlshit:envs.net | Yeah, I changed the config a little, same situation.
Do I need to load a kernel module or configure something? | 00:15:46 |
| Magnus Jurdal joined the room. | 07:40:18 |
tcurdt | I am stuck on this issue here https://github.com/nix-community/disko/issues/1026
Am I doing something wrong? | 11:20:21 |
tcurdt | --mode destroy --yes-wipe-all-disks ignores --yes-wipe-all-disks and gets stuck waiting for input
and
--mode destroy,format,mount --yes-wipe-all-disks also gets stuck ... maybe a missing sync?
| 11:22:42 |
lassulus | Huh stuck sounds like a bug | 12:08:07 |
lassulus | It should run with -x already. So what is the output? | 12:08:22 |
tcurdt | I have added the debug output to the ticket.
| 12:37:23 |
tcurdt | Oh, you mean for --mode destroy,format,mount ? | 12:37:24 |
tcurdt | lassulus: I have added the debug output for the "disko" mode
https://github.com/nix-community/disko/issues/1026
| 13:19:42 |
tcurdt | Nothing happens anymore after lsblk -a -f | 13:20:21 |
mkg20001 | then you need to specify the device grub should write the MBR to
look under lsblk
note that yoiu should not use a partition (so /dev/nvme0n1 - but not /dev/nvme0n1p1) | 17:13:35 |
@realhotgirlshit:envs.net | Does disko-install change a partition’s UUID every time it’s run? | 23:36:47 |
| @cent:neuland.enterprises left the room. | 23:39:13 |
| 29 Apr 2025 |
hexa | probably, yeah | 01:21:52 |
hexa | but you can use the disko config to populate mountpoints | 01:22:24 |
hexa | so that's a non-issue for mounting | 01:22:34 |
lassulus | I think you can specify uuids now. But i never tested it | 01:28:39 |
@realhotgirlshit:envs.net | I’m trying to install NixOS through disko with a BTRFS partitions/full disk encrypted setup. I’ve changed the configuration in a couple different ways, and ran disko-install, each time. GRUB always allows two password entries telling me Invalid password, and a third attempt which ends with a cryptodisk not found meltdown and rescue prompt.
The changes I’ve made recently:
Change all UUID partition references to /dev/sda or /dev/sda2. Made sure that btrfs was present during boot. Expanded the boot device definition to have more details vs. the previous version which just had the path.
Relevant configuration.nix:
# Disable UEFI.
boot.loader.systemd-boot.enable = false;
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.efiSupport = false;
boot.loader.grub.enableCryptodisk = true;
boot.loader.efi.canTouchEfiVariables = false;
# boot.loader.grub.efiInstallAsRemovable = true;
# boot.loader.efi.efiSysMountPoint = "/boot/efi";
# Define on which hard drive you want to install Grub.
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
boot.initrd.luks.devices.cryptroot.devices = [
{
name = "luksroot";
device = "/dev/sda2";
}
];
boot.initrd.supportedFilesystems = [ "btrfs" ];
Disko configuration in flake.nix:
{
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
inputs.disko.url = "github:nix-community/disko/latest";
inputs.disko.inputs.nixpkgs.follows = "nixpkgs";
outputs = {self, disko, nixpkgs }: {
nixosConfigurations.koolthing = nixpkgs.legacyPackages.x86_64-linux.nixos [
./configuration.nix
disko.nixosModules.disko
{
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
# Legacy BIOS, MBR-style partition table.
boot = {
size = "1M";
type = "EF02"; # Grub MBR.
};
# The LUKS-encrypted root.
luks = {
size = "300G";
content = {
type = "luks";
name = "crypted";
# Set up with an interactive password and not a keyfile.
settings = {
allowDiscards = true;
};
# The Btrfs filesystem.
content = {
type = "btrfs";
extraArgs = ["-f"]; # Overwrite any existing file system.
subvolumes = {
"/root" = {
mountpoint = "/";
mountOptions = [
"compress=zstd"
"noatime"
];
};
# The home subvolume.
"/home" = {
mountpoint = "/home";
mountOptions = [
"compress=zstd"
"noatime"
];
};
# The nix subvolume.
"/nix" = {
mountpoint = "/nix";
mountOptions = [
"compress=zstd"
"noatime"
];
};
};
};
};
};
};
};
};
};
};
}
];
};
}
| 01:43:10 |
lassulus | Remove the enableCryptoDisk Option from grub. This is used for encrypted /Boot partitions | 02:00:08 |
lassulus | Oh wait that seems to be what you want to do? | 02:00:32 |