!oNSIfazDqEcwhcOjSL:matrix.org

disko

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

Load older messages


SenderMessageTime
1 Jun 2025
@pink_rocky:tchncs.derocky ((λ💝.💝)💐) (she/they; ask before DM please)
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).

{ config, lib, pkgs, ... }:

{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
      "${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix"
      ./disk-config.nix
    ];

  # Use the GRUB 2 boot loader.
  boot.loader.grub.enable = true;
  boot.loader.grub.efiSupport = 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.loader.grub.enableCryptodisk = true;
  boot.initrd.luks.devices.cryptroot.device = "/dev/sda";

  # networking.hostName = "nixos"; # Define your hostname.
  # Pick only one of the below networking options.
  # networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.
  # networking.networkmanager.enable = true;  # Easiest to use and most distros use this by default.

  # Set your time zone.
  # time.timeZone = "Europe/Amsterdam";

  # Configure network proxy if necessary
  # networking.proxy.default = "http://user:password@proxy:port/";
  # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";

  # Select internationalisation properties.
  # i18n.defaultLocale = "en_US.UTF-8";
  # console = {
  #   font = "Lat2-Terminus16";
  #   keyMap = "us";
  #   useXkbConfig = true; # use xkb.options in tty.
  # };

  # Enable the X11 windowing system.
  # services.xserver.enable = true;


  

  # Configure keymap in X11
  # services.xserver.xkb.layout = "us";
  # services.xserver.xkb.options = "eurosign:e,caps:escape";

  # Enable CUPS to print documents.
  # services.printing.enable = true;

  # Enable sound.
  # services.pulseaudio.enable = true;
  # OR
  # services.pipewire = {
  #   enable = true;
  #   pulse.enable = true;
  # };

  # Enable touchpad support (enabled default in most desktopManager).
  # services.libinput.enable = true;

  # Define a user account. Don't forget to set a password with ‘passwd’.
  # users.users.alice = {
  #   isNormalUser = true;
  #   extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
  #   packages = with pkgs; [
  #     tree
  #   ];
  # };

  # programs.firefox.enable = true;

  # List packages installed in system profile.
  # You can use https://search.nixos.org/ to find more packages (and options).
  # environment.systemPackages = with pkgs; [
  #   vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
  #   wget
  # ];

  # Some programs need SUID wrappers, can be configured further or are
  # started in user sessions.
  # programs.mtr.enable = true;
  # programs.gnupg.agent = {
  #   enable = true;
  #   enableSSHSupport = true;
  # };

  # List services that you want to enable:

  # Enable the OpenSSH daemon.
  # services.openssh.enable = true;

  # Open ports in the firewall.
  # networking.firewall.allowedTCPPorts = [ ... ];
  # networking.firewall.allowedUDPPorts = [ ... ];
  # Or disable the firewall altogether.
  # networking.firewall.enable = false;

  # Copy the NixOS configuration file and link it from the resulting system
  # (/run/current-system/configuration.nix). This is useful in case you
  # accidentally delete configuration.nix.
  # system.copySystemConfiguration = true;

  # This option defines the first version of NixOS you have installed on this particular machine,
  # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
  #
  # Most users should NEVER change this value after the initial install, for any reason,
  # even if you've upgraded your system to a new NixOS release.
  #
  # This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
  # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
  # to actually do that.
  #
  # This value being lower than the current NixOS release does NOT mean your system is
  # out of date, out of support, or vulnerable.
  #
  # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
  # and migrated your data accordingly.
  #
  # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
  system.stateVersion = "25.05"; # Did you read the comment?

}
23:44:59
2 Jun 2025
@disco_stick:matrix.orgfood style edible product changed their display name from SSBSD to Take the I-Whatever to Desolation.01:48:05
@pink_rocky:tchncs.derocky ((λ💝.💝)💐) (she/they; ask before DM please)Okay, now I can confirm that the hardware configuration wasn't a factor05:18:00
@deeok:matrix.org@deeok:matrix.org joined the room.18:34:24
3 Jun 2025
@pink_rocky:tchncs.derocky ((λ💝.💝)💐) (she/they; ask before DM please)Okay, right now I’ve gotten it to error on the build with: "Unable to read fragment cache entry" "Unable to read page" "unknown filesystem type 'btrfs'"08:55:32
@pink_rocky:tchncs.derocky ((λ💝.💝)💐) (she/they; ask before DM please)Attaching the files currently08:55:38
@pink_rocky:tchncs.derocky ((λ💝.💝)💐) (she/they; ask before DM please)Download configuration.nix08:58:22
@pink_rocky:tchncs.derocky ((λ💝.💝)💐) (she/they; ask before DM please)Download disk-config.nix08:58:23
@sylk0s:matrix.orgSylkos changed their display name from sylk0s to Sylkos.16:10:19
@sylk0s:matrix.orgSylkos set a profile picture.16:15:03
4 Jun 2025
@rob.sliwi:matrix.orgrobsliwi changed their display name from Robert Sliwinski to robsliwi.18:30:13
5 Jun 2025
@s:consortium.chatshelvacu joined the room.21:48:38
@s:consortium.chatshelvacu

https://github.com/nix-community/disko/blob/d74db625a5cf3f46cf8fa545d6ef10bd3463ea07/lib/types/gpt.nix#L259

if ! blkid "${config.device}" >&2; then
  sgdisk --clear "${config.device}"
fi

I can't tell if I found a bug or if I'm just not understanding this; blkid exits with code 2 when run on a blank (all 00) block device, in which case it... clears the gpt label? that isn't there?

21:55:56
@s:consortium.chatshelvacu
In reply to @pink_rocky:tchncs.de
Okay, right now I’ve gotten it to error on the build with:
"Unable to read fragment cache entry"
"Unable to read page"
"unknown filesystem type 'btrfs'"
what exactly are you building? Do you mean nixos-rebuild build? Could send the full output in a pastebin or smth?
22:03:21
@s:consortium.chatshelvacu
In reply to @pink_rocky:tchncs.de
configuration.nix
Separately, I highly recommend switching to a flake-based config in a git repo. That would make it possible to link to a specific commit and then everyone else can run the exact same build.
22:05:09
@s:consortium.chatshelvacu Also I strongly recommend not using /dev/sdb as the device; the ordering can change between boots and when you add/remove thumb drives. Instead look for your drive in /dev/disk/by-id/ 22:06:24
@s:consortium.chatshelvacu also I can't build your config because it's missing hardware-configuration.nix 22:09:11
6 Jun 2025
@creepinson:matrix.org@creepinson:matrix.org left the room.00:18:44
@francesco:zanini.mefrancesco joined the room.07:06:03
@pink_rocky:tchncs.derocky ((λ💝.💝)💐) (she/they; ask before DM please)@shelvacu Thank you for the help! I will give you that info later07:35:28
@francesco:zanini.mefrancesco

Hey folks, quick question: I'm trying to setup a bind mount that points to a file system part of a disk managed by disko. I am unable to build the disk image because the order of operation is wrong:

  1. disks and filesystems created
  2. (a file-system irrelevant to this issue is mounted)
  3. bind mount tried, but source fs not mounted
  4. (I assume here it would mount the source fs)

Is there anything I can do to influence the order? I tried messing around with _meta.deviceDependencies but without much success.

11:59:29
@s:consortium.chatshelvacuyou should be able to look at the script produced by disko and confirm #412:01:32
@s:consortium.chatshelvacuwhich would be good to check since its a very different issue if its mounted nowhere12:02:08
@francesco:zanini.mefrancescoThanks let me check that.12:03:07
@francesco:zanini.mefrancescoMy assumption was correct: the issue starts here: https://github.com/nix-community/disko/blob/17d08c65c241b1d65b3ddf79e3fac1ddc870b0f6/lib/default.nix#L970 Basically I have root (tmpfs), a writable partition at /system, and a bind mount /nix -> /system/nix.12:06:37
@francesco:zanini.mefrancesco

the mount order is currently:

  • root
  • /nix (bind)
  • /system/nix

I guess a possible work-around would be to call system anything that is lexicographically before nix?

12:08:00
@s:consortium.chatshelvacu
In reply to @francesco:zanini.me
My assumption was correct: the issue starts here: https://github.com/nix-community/disko/blob/17d08c65c241b1d65b3ddf79e3fac1ddc870b0f6/lib/default.nix#L970

Basically I have root (tmpfs), a writable partition at /system, and a bind mount /nix -> /system/nix.
im not super familiar with disko but it seems youve found proof that mount ordering simply isnt implemented (other than /a before /a/b because alphabetical)
12:09:44
@s:consortium.chatshelvacuif its any help, once disko configures fileSystems.* in a nixos config it should all just work12:10:41
@francesco:zanini.mefrancesco I'm wondering if it would make sense to implement fileSystem.<name>.depends also from within disko? By doing so, disko can use this information for ordering, as well as populate the entry in nixos. Alternatively, adapt disko to do something similar to what nixos does without extra config (figure out fs dependencies automatically, by looking at their mountpoints) 12:12:52
@s:consortium.chatshelvacuthat would be neat imo12:13:31

Show newer messages


Back to Room ListRoom Version: 10