!oNSIfazDqEcwhcOjSL:matrix.org

disko

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

Load older messages


SenderMessageTime
3 Nov 2024
@no-mood:matrix.orgno-moodOh right I was referring to Disko-install16:46:40
@phaer:matrix.orgphaerArbitrary files? Maybe --extra-files helps? That one copies files from your current system into the installed target system 16:47:19
@no-mood:matrix.orgno-moodI'm not sure what was causing that problem, now it works with the --build-on-remote 16:48:45
@no-mood:matrix.orgno-moodWhile with Disko-install it was crashing16:49:03
4 Nov 2024
@d:arcticfoxes.netdave joined the room.00:42:51
@no-mood:matrix.orgno-mood
In reply to @no-mood:matrix.org
While with Disko-install it was crashing
UPDATE: this was related to cosmic cache not working properly, this caused the installer to crash. Thank you :)
13:09:16
@no-mood:matrix.orgno-moodQuick question: I couldn't find if Disko can generate a mount script to mount the drive elsewhere. Is that possible?13:10:16
@pinpox:matrix.orgpinpox Hello! I'm trying to generate an image that i can dd to my notebook and boot. I'm using LUKS and used the --pre-format-files /tmp/secret.key /tmp.secret.key option to set the password for encryption. But now after dd'ing it I get this error when trying to boot: 19:32:39
@pinpox:matrix.orgpinpox(Sorry for the shitty screenshot, no idea how to take a proper one from the boot menu19:33:03
@pinpox:matrix.orgpinpoximage.png
Download image.png
19:33:05
@pinpox:matrix.orgpinpox * (Sorry for the shitty screenshot, no idea how to take a proper one from the boot menu)19:33:06
@pinpox:matrix.orgpinpoxIt is trying to find the encryption key file on the real machine.19:33:23
@pinpox:matrix.orgpinpoxHow do I generate a LUKS encrypted disko system that asks for the password and then boots?19:33:44
@lassulus:lassul.uslassulusI think the impure image script should be able to ask you for the password interactively19:38:23
@pinpox:matrix.orgpinpoxHow do I use that/make it ask?19:39:21
@pinpox:matrix.orgpinpox

currently using this config:
https://termbin.com/v5pk
then running:

nix build .\#nixosConfigurations.limette.config.system.build.diskoImagesScript 
sudo  ./result --build-memory 4096 --pre-format-files /tmp/secret.key /tmp/secret.ke
dd if=main.raw ... 
19:40:34
@pinpox:matrix.orgpinpox *

currently using this config:
https://termbin.com/v5pk
then running:

nix build .\#nixosConfigurations.limette.config.system.build.diskoImagesScript 
sudo  ./result --build-memory 4096 --pre-format-files /tmp/secret.key /tmp/secret.key
sudo dd if=main.raw ... 
19:42:26
@brian:bmcgee.ie@brian:bmcgee.ie

I'm having trouble mixing in a passwordFile for vmVariantWithDisko. It doesn't seem to like merging this config:

  virtualisation.vmVariantWithDisko = {
    disko.devices.mdadm = let
        passwordFile = pkgs.writeText "secret.key" "!Pa55w0rd";
    in {
        raid0.content.passwordFile = passwordFile;
        raid5.content.passwordFile = passwordFile;
    };
  };

Gives me:
at «string»:1:1:
1| nixosConfigurations.saturn.config.virtualisation.vmVariantWithDisko.disko.devices.mdadm.raid0.content
| ^

   … while evaluating the attribute 'value'
     at /nix/store/vpzg5qjqwl76ichhjwwgmwc8v3j369q5-source/lib/modules.nix:809:9:
      808|     in warnDeprecation opt //
      809|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
         |         ^
      810|         inherit (res.defsFinal') highestPrio;

   (stack trace truncated; use '--show-trace' to show the full trace)

   error: No type option set in:
   {
     passwordFile = <derivation secret.key>;
   }

20:16:49
@brian:bmcgee.ie@brian:bmcgee.ie *

I'm having trouble mixing in a passwordFile for vmVariantWithDisko. It doesn't seem to like merging this config:

  virtualisation.vmVariantWithDisko = {
    disko.devices.mdadm = let
        passwordFile = pkgs.writeText "secret.key" "!Pa55w0rd";
    in {
        raid0.content.passwordFile = passwordFile;
        raid5.content.passwordFile = passwordFile;
    };
  };

Gives me:
at «string»:1:1:
1| nixosConfigurations.saturn.config.virtualisation.vmVariantWithDisko.disko.devices.mdadm.raid0.content
| ^

   … while evaluating the attribute 'value'
     at /nix/store/vpzg5qjqwl76ichhjwwgmwc8v3j369q5-source/lib/modules.nix:809:9:
      808|     in warnDeprecation opt //
      809|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
         |         ^
      810|         inherit (res.defsFinal') highestPrio;

   (stack trace truncated; use '--show-trace' to show the full trace)

   error: No type option set in:
   {
     passwordFile = <derivation secret.key>;
   }
20:16:59
@lassulus:lassul.uslassulus
In reply to @pinpox:matrix.org

currently using this config:
https://termbin.com/v5pk
then running:

nix build .\#nixosConfigurations.limette.config.system.build.diskoImagesScript 
sudo  ./result --build-memory 4096 --pre-format-files /tmp/secret.key /tmp/secret.key
sudo dd if=main.raw ... 
ah that is already the impure script, but you can skip configuring a keyFile in that case
20:18:21
@brian:bmcgee.ie@brian:bmcgee.ie

Here's the luks setup in my main disko config:

    mdadm = {
      raid0 = {
        type = "mdadm";
        level = 0;
        content = {
          type = "luks";
          name = "crypted-root";
          settings = {
            allowDiscards = true;
          };
          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"
                ];
              };
            };
          };
        };
      };
      raid5 = {
        type = "mdadm";
        level = 5;
        content = {
          type = "luks";
          name = "crypted-archive";
          content = {
            type = "btrfs";
            extraArgs = [ "-f" ];
            subvolumes = {
              "/archive" = {
                mountpoint = "/archive";
                mountOptions = [
                  "compress=zstd"
                  "noatime"
                ];
              };
              "/archive/media" = {
                mountpoint = "/archive/media";
                mountOptions = [
                  "compress=zstd"
                  "noatime"
                ];
              };
              "/archive/backups" = {
                mountpoint = "/archive/backups";
                mountOptions = [
                  "compress=zstd"
                  "noatime"
                ];
              };
            };
          };
        };
      };
    };
20:18:48
@brian:bmcgee.ie@brian:bmcgee.ie *

Here's the luks setup in my main disko config:

    disko.devices.mdadm = {
      raid0 = {
        type = "mdadm";
        level = 0;
        content = {
          type = "luks";
          name = "crypted-root";
          settings = {
            allowDiscards = true;
          };
          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"
                ];
              };
            };
          };
        };
      };
      raid5 = {
        type = "mdadm";
        level = 5;
        content = {
          type = "luks";
          name = "crypted-archive";
          content = {
            type = "btrfs";
            extraArgs = [ "-f" ];
            subvolumes = {
              "/archive" = {
                mountpoint = "/archive";
                mountOptions = [
                  "compress=zstd"
                  "noatime"
                ];
              };
              "/archive/media" = {
                mountpoint = "/archive/media";
                mountOptions = [
                  "compress=zstd"
                  "noatime"
                ];
              };
              "/archive/backups" = {
                mountpoint = "/archive/backups";
                mountOptions = [
                  "compress=zstd"
                  "noatime"
                ];
              };
            };
          };
        };
      };
    };
20:19:12
@lassulus:lassul.uslassulusthat sounds like https://github.com/NixOS/nixpkgs/pull/254790#discussion_r135807345820:19:34
@brian:bmcgee.ie@brian:bmcgee.ieYeah, looks like it20:21:41
@brian:bmcgee.ie@brian:bmcgee.ieI'll read this properly tomorrow and see if I can work around it20:23:30
@tanvir:hackliberty.orgTanvir changed their profile picture.21:41:18
@tuxiqae:matrix.orgtuxiqaeIs it possible to create an AWS image using nixos-generators with disk configuration defined by Disko?23:04:09
@pinpox:matrix.orgpinpox
In reply to @lassulus:lassul.us
ah that is already the impure script, but you can skip configuring a keyFile in that case
I tried commenting it out like this: https://termbin.com/v5pk but then it doesn't build an image
23:27:26
@kranzes:matrix.org@kranzes:matrix.org
In reply to @tuxiqae:matrix.org
Is it possible to create an AWS image using nixos-generators with disk configuration defined by Disko?
Honestly I would talk to Arianvp for stuff related to AWS images and nixos
23:57:28
5 Nov 2024
@deliganli:matrix.orgSait set a profile picture.06:56:03

Show newer messages


Back to Room ListRoom Version: 10