!oNSIfazDqEcwhcOjSL:matrix.org

disko

365 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko93 Servers

Load older messages


SenderMessageTime
24 Nov 2024
@danjujan:matrix.jschmitz.eudanjujan joined the room.10:34:18
25 Nov 2024
@nullcube:matrix.org@nullcube:matrix.org joined the room.10:04:53
@luxus:beeper.comluxus joined the room.18:06:38
@else42:tchncs.deelse42 joined the room.21:54:50
@else42:tchncs.deelse42 hey! trying to set up a new system via nixos net image using disko-install. hitting this error:
/nix/store/bz18paxklav6yyhqvvl1l7aiq3drncy4-disko-install/bin/.disko-install-wrapped: line 216: artifacts[1]: unbound variable
anybody got an idea what that could be related to? this is my config: https://gist.github.com/elsbrock/7707bb8edfe527fbf250aa2c99ca5815
21:56:26
@else42:tchncs.deelse42
[nixos@nixos:~/infra]$ sed -n '214, 220 p' /nix/store/bz18paxklav6yyhqvvl1l7aiq3drncy4-disko-install/bin/.disko-install-wrapped
  IFS=$'\n' mapfile -t artifacts <<<"$outputs"
  nixos_system=${artifacts[0]}
  closure_info=${artifacts[1]}
  disko_script=${artifacts[2]}

  if [[ -n ${dry_run-} ]]; then
    echo "Would run: $disko_script"
21:58:20
26 Nov 2024
@maralorn:maralorn.demaralornI am trying to configure a system based on the zfs examples.10:21:15
@maralorn:maralorn.demaralornI have a zpool which configures mountpoint "/"10:21:27
@maralorn:maralorn.demaralorn On eval I get the error The fileSystems option does not specifiy your root file system. 10:22:03
@maralorn:maralorn.demaralornOooof, classic flakes problem …10:22:51
@maralorn:maralorn.demaralornHadn’t staged disko-config.nix10:23:00
@victorbjelkholm:matrix.orgvictorbjelkholm joined the room.16:02:33
27 Nov 2024
@jopejoe1:matrix.orgjopejoe1 changed their display name from jopejoe1 to jopejoe1 [4094].18:19:01
@netpleb:matrix.orgnetpleb

I have a disks.nix in my git repo, added it to my configuration, and disko-install ... worked perfectly! My my disks config looks like (basically it is the luks-btrfs example in the docs):

{
  disko.devices = {
    disk = {
      main = {
        type = "disk";
        # When using disko-install, we can overwrite this value (device) from the commandline:
        # $ sudo nix run 'github:nix-community/disko/latest#disko-install' -- --write-efi-boot-entries --flake '/tmp/config/etc/nixos#mymachine' --disk main /dev/sda
        # see: https://github.com/nix-community/disko/blob/master/docs/disko-install.md
        device = "/dev/nvme0n1";
        content = {
          type = "gpt";
          partitions = {
            ESP = {
              size = "512M";
              type = "EF00";
              content = {
                type = "filesystem";
                format = "vfat";
                mountpoint = "/boot";
                mountOptions = [ "umask=0077" ];
              };
            };
            luks = {
              size = "100%";
              content = {
                type = "luks";
                name = "crypted";
                # disable settings.keyFile if you want to use interactive password entry
                #passwordFile = "/tmp/secret.key"; # Interactive
                settings = {
                  allowDiscards = true;
                  # keyFile = "/tmp/secret.key";
                };
                # additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
                content = {
                  type = "btrfs";
                  extraArgs = [ "-f" ];
                  subvolumes = {
                    "/root" = {
                      mountpoint = "/";
                      mountOptions = [ "compress=zstd" "noatime" ];
                    };
                    "/home" = {
                      mountpoint = "/home";
                      mountOptions = [ "compress=zstd" "noatime" ];
                    };
                    "/nix" = {
                      mountpoint = "/nix";
                      mountOptions = [ "compress=zstd" "noatime" ];
                    };
                    "/swap" = {
                      mountpoint = "/.swapvol";
                      swap.swapfile.size = "8G";
                    };
                  };
                };
              };
            };
          };
        };
      };
    };
  };
}
18:35:59
@netpleb:matrix.orgnetpleb Then I added a second nvme device to the machine and booted it up. I noticed that the machine switched the original /dev/nvme0n1 over to /dev/nvme1n1 and the new device is now /dev/nvme0n1, but it booted up just fine. I am guessing that is becuase (correctly) disko set fileSystems."/".device = "crypted". So far so good. 18:40:29
@netpleb:matrix.orgnetpleb but here is my question: can I somehow simply update my disks.nix file and use disko to add the 2nd device to the btrfs filesystem? or do I need to run the respective btrfs device add ... and btrfs balance start -mconvert=raid1 commands myself? 18:45:58
@netpleb:matrix.orgnetpleb * but here is my question: can I somehow simply update my disks.nix file and use disko to add the 2nd device to the btrfs filesystem? or do I need to run the respective btrfs device add ... and btrfs balance start -mconvert=raid1 commands myself (which is of course how I have done it in a non-declarative pre-disko world)? 18:46:27
@thedragon44:matrix.orgTheDragon left the room.23:33:42
29 Nov 2024
@joerg:thalheim.ioMic92 netpleb: there is a format mode that should not destroy your existing disk and add missing partitions disks etc. But I am not sure this works for raid conversion yet. 13:07:19
@joerg:thalheim.ioMic92I don't think we have any convert for this use case13:07:42
@joerg:thalheim.ioMic92 lassulus: https://github.com/nix-community/disko/pull/891/files#r1863500583 I need your help with one _unmount option definition. I don't yet understand yet, how thse magic { fs = ; dev = }; attrs are working and when I cannot use them 13:08:30
@lassulus:lassul.uslassuluswhats the error? I think you need to use config.content._unmount.fs instead of the top level thingie?13:17:39
@joerg:thalheim.ioMic92I think I fixed13:22:04
@joerg:thalheim.ioMic92Interestingly I think I found now a bug in the disko mount code.13:37:50
@joerg:thalheim.ioMic92https://buildbot.thalheim.io/#/builders/64/builds/872/steps/1/logs/stdio13:37:52
@joerg:thalheim.ioMic92Here it imports the zpool before resolving device dependencies.13:38:09
@joerg:thalheim.ioMic92 lassulus: any idea how to solve this? 13:39:34
@lassulus:lassul.uslassulusYou added a reverse list 13:40:22
@joerg:thalheim.ioMic92Not this is mount not unmount13:40:45
@lassulus:lassul.uslassulushttps://github.com/nix-community/disko/pull/891/files#diff-84f980eccc1d3f99c10f8b0e6c5c5fc2af2069517533c4c4d73264a190e85188R64713:41:00

Show newer messages


Back to Room ListRoom Version: 10