!oNSIfazDqEcwhcOjSL:matrix.org

disko

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

Load older messages


SenderMessageTime
21 Dec 2024
@joerg:thalheim.ioMic92mountpoint -q "${mountPoint}"09:47:17
@joerg:thalheim.ioMic92Does your disko config not mount anything to it's mountpoint?09:47:37
@raj-magesh:matrix.orgRaj

I think it does. Here it is:

{
  disko.devices = {
    nodev."/" = {
      fsType = "tmpfs";
      mountOptions = [
        "size=2G"
        "defaults"
        "mode=755"
      ];
    };
    nodev."/home/username" = {
      fsType = "tmpfs";
      mountOptions = [
        "size=2G"
        "defaults"
        "mode=777"
      ];
    };
    disk = {
      os = {
        imageName = "nixos-usb-stick";
        imageSize = "60G";
        type = "disk";
        content = {
          type = "gpt";
          partitions = {
            ESP = {
              type = "EF00";
              priority = 0;
              end = "1G";
              content = {
                type = "filesystem";
                format = "vfat";
                mountpoint = "/boot";
                mountOptions = ["defaults" "umask=0077"];
              };
            };
            root = {
              priority = 1;
              end = "-0";
              content = {
                type = "luks";
                name = "root";
                initrdUnlock = true;
                extraFormatArgs = ["--pbkdf argon2id"];
                content = {
                  type = "btrfs";
                  extraArgs = ["-f"];
                  subvolumes = {
                    "/nix" = {
                      mountpoint = "/nix";
                      mountOptions = ["compress=zstd" "noatime"];
                    };
                    "/persist" = {
                      mountpoint = "/persist";
                      mountOptions = ["compress=zstd" "noatime"];
                    };
                    "/data" = {
                      mountpoint = "/data";
                      mountOptions = ["compress=zstd" "noatime"];
                    };
                  };
                };
              };
            };
          };
        };
      };
    };
  };
}

20:10:08
@raj-magesh:matrix.orgRajThis doesn't return anything :(20:11:27
@raj-magesh:matrix.orgRajAlso, if you can think of an easier way to create a USB stick with (i) a bootable NixOS (for recovery purposes) and (ii) persistent storage of important files, that'd work for me too!20:12:39
@raj-magesh:matrix.orgRaj* Also, if you can think of an easier way to create a USB stick with (i) a bootable custom NixOS (for recovery purposes) and (ii) persistent storage of important files, that'd work for me too!20:12:50
@nam3l33ss:matrix.org·☽•Nameless☆•777 · ± changed their profile picture.21:37:37
@waltmck:matrix.orgwaltmckhey, what is the best way to set up encrypted ZFS on root using disko?23:54:59
@waltmck:matrix.orgwaltmckIs there a way to get it to prompt me for a passphrase while I am provisioning the dataset?23:55:36
@waltmck:matrix.orgwaltmck also, what is the difference between zpool.<name>.rootFsOptions and zpool.<name>.options? 23:58:42
22 Dec 2024
@waltmck:matrix.orgwaltmckand generally I want to make sure I understand how zfs property inheritance works with disko00:18:08
@enzime:nixos.devEnzime
In reply to @waltmck:matrix.org
also, what is the difference between zpool.<name>.rootFsOptions and zpool.<name>.options?
zpool options are https://openzfs.github.io/openzfs-docs/man/master/7/zpoolprops.7.html
00:19:28
@enzime:nixos.devEnzimewhereas the rootfsoptions is https://openzfs.github.io/openzfs-docs/man/master/7/zfsprops.7.html00:19:46
@enzime:nixos.devEnzimebecause every zpool has an implicit 'root' dataset00:20:05
@enzime:nixos.devEnzime
In reply to @waltmck:matrix.org
Is there a way to get it to prompt me for a passphrase while I am provisioning the dataset?
it should do that if you don't set passwordFile or keyFile
00:20:27
@enzime:nixos.devEnzimehow are you using disko?00:20:41
@waltmck:matrix.orgwaltmck I'm not sure yet. I have used it with nixos-anywhere in the pass to deploy to headless servers, but it may be difficult since I am trying to set up encrypted root. I have physical access to this machine 00:21:36
@waltmck:matrix.orgwaltmck * I'm not sure yet. I have used it with nixos-anywhere in the past to deploy to headless servers, but it may be difficult since I am trying to set up encrypted root. I have physical access to this machine 00:21:49
@enzime:nixos.devEnzime
In reply to @waltmck:matrix.org
I'm not sure yet. I have used it with nixos-anywhere in the past to deploy to headless servers, but it may be difficult since I am trying to set up encrypted root. I have physical access to this machine
it should work fine with nixos-anywhere
00:23:53
@enzime:nixos.devEnzimeI'm not sure if I've tested if the prompting for passwords works correctly over SSH though00:24:07
@enzime:nixos.devEnzimeit should work00:24:23
@enzime:nixos.devEnzimehttps://github.com/nix-community/nixos-anywhere/blob/main/docs/cli.md?plain=1#L41-L4300:24:48
@waltmck:matrix.orgwaltmckI'll check!00:24:59
@enzime:nixos.devEnzime
In reply to @enzime:nixos.dev
https://github.com/nix-community/nixos-anywhere/blob/main/docs/cli.md?plain=1#L41-L43
this option is for if you want to write the password from a file and read it from that file
00:25:16
@enzime:nixos.devEnzime you'll need to set the corresponding passwordFile though for your luks 00:25:40
@enzime:nixos.devEnzimeyou shouldn't need to use this flag if you want to prompt for your password00:26:16
@waltmck:matrix.orgwaltmckI'm not using luks, I'm using zfs native encryption00:27:10
@waltmck:matrix.orgwaltmck but I set keylocation="prompt", I'll see if that works 00:27:45
@waltmck:matrix.orgwaltmck Do you see anything obviously stupid in my config? 00:28:06
@waltmck:matrix.orgwaltmck(I separated the datasets part into a different file from the vdev part)00:28:46

Show newer messages


Back to Room ListRoom Version: 10