27 Apr 2025 |
@wilma-schultz:tchncs.de | Redacted or Malformed Event | 03:19:36 |
@wilma-schultz:tchncs.de | Redacted or Malformed Event | 03:20:10 |
@wilma-schultz:tchncs.de | Redacted or Malformed Event | 03:20:51 |
@wilma-schultz:tchncs.de | Redacted or Malformed Event | 03:21:21 |
@wilma-schultz:tchncs.de | Redacted or Malformed Event | 03:21:26 |
@wilma-schultz:tchncs.de | Redacted or Malformed Event | 03:21:28 |
@wilma-schultz:tchncs.de | Redacted or Malformed Event | 03:21:29 |
@wilma-schultz:tchncs.de | Redacted or Malformed Event | 03:21:30 |
| NixOS Moderation Bot banned @wilma-schultz:tchncs.de (<no reason supplied>). | 03:21:30 |
| uep changed the join rule to "invite" from "public". | 03:25:00 |
| @awwpotato:envs.net left the room. | 03:45:01 |
| @slamphear:matrix.org left the room. | 05:20:59 |
rocky (she/they) 🏳️⚧️ | I’m trying to set up LUKS–style Btrfs full disk encryption on my older BIOS desktop with a layout generated from disko. I try to install it, but I get an error that says installation of GRUB on /dev/sda failed: No such file or directory .
The command I used:
sudo nix --extra-experimental-features nix-command --extra-experimental-features flakes run 'github:nix-community/disko/latest#disko-install' -- --flake '/etc/nixos#koolthing' --disk main /dev/sda
The relevant NixOS configuration:
# 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.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
The entire disko configuration in its flake:
{
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/vdb";
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"
];
};
};
};
};
};
};
};
};
};
};
}
];
};
}
| 06:45:27 |
l0b0 | Absolutely! It supports all popular languages out of the box, allows mixing them (much easier than trying to get N package managers to cooperate), and by just doing idiomatic Nix you automatically get one of the best things for monorepos: minimal rebuilds. | 07:33:40 |
Marcus | Ffs | 08:10:42 |
l0b0 | It just means what it says: /dev/sda does not exist. You'll have to specify a different disk. | 08:21:34 |
l0b0 | But this is not really appropriate for this room; try https://matrix.to/#/#disko:nixos.org instead. | 08:22:03 |
| @tedbyron:matrix.org left the room. | 17:30:59 |
28 Apr 2025 |
zonnebloem | hi | 13:17:06 |
zonnebloem | I'm having trouble converting pkgs.substituteAll to pkgs.replaceVars | 13:17:36 |
zonnebloem | cssBase = builtins.readFile (
pkgs.replaceVars ./waybar-style.css {
base03 = "#002b36";
doesntExist = "#073642";
}
);
nix error
error: builder for '/nix/store/ljzv9k9dj9n6hh3mgsxwjw161qcw6a40-waybar-style.css.drv' failed with exit code 1;
last 6 log lines:
> Running phase: patchPhase
> Running phase: updateAutotoolsGnuConfigScriptsPhase
> Running phase: configurePhase
> no configure script, doing nothing
> Running phase: buildPhase
> substituteStream() in derivation waybar-style.css: ERROR: pattern @doesntExist@ doesn't match anything in file '/nix/store/x6b14c7gkk03wkh1pgsw2klffzv4hdsf-waybar-style.css'
For full logs, run:
nix log /nix/store/ljzv9k9dj9n6hh3mgsxwjw161qcw6a40-waybar-style.css.drv
replaceVars doesn't ignore extras in the set. Is there a way to ignore the extras?
| 13:22:27 |
| @charlotte:vanpetegem.me left the room. | 14:31:25 |
Matt Sturgeon | That's intentional; the idea is that you only pass the variables you actually want to replace to replaceVars .
That's one of the main reasons why replaceVars is preferred over substituteAll .
If you don't know what vars will be available to replace, you should continue using substituteAll . However generally it's better to be explicit and only pass the variables you actually want to replace to replaceVars .
let
colours = {
# ...
};
cssBase = builtins.readFile (
pkgs.replaceVars ./waybar-style.css {
inherit (colours)
base03
;
}
);
in
Side-note: passing your replaceVars derivation to builtins.readFile is an example of Import From Derivation. This is often a bad idea; it leads to poor performance; it also isn't allowed in the nixpkgs repo.
| 15:03:56 |
Matt Sturgeon | * That's intentional; the idea is that you only pass the variables you actually want to replace to replaceVars .
In most cases, the input variables not matching the variables present in the template file is a bug; e.g. a spelling error; or a change in the template file that hasn't been updated in the input variables.
That's one of the main reasons why replaceVars is preferred over substituteAll .
If you don't know what vars will be available to replace, you should continue using substituteAll . However generally it's better to be explicit and only pass the variables you actually want to replace to replaceVars .
let
colours = {
# ...
};
cssBase = builtins.readFile (
pkgs.replaceVars ./waybar-style.css {
inherit (colours)
base03
;
}
);
in
Side-note: passing your replaceVars derivation to builtins.readFile is an example of Import From Derivation. This is often a bad idea; it leads to poor performance; it also isn't allowed in the nixpkgs repo.
| 15:05:39 |
29 Apr 2025 |
| This legally distinct plastic brick is licensed under the terms of the he/him or they/them pronouns, at your choice changed their display name from This LEGO® Worm™ is licensed under the terms of the he/him or they/them pronouns, at your choice to This legally distinct plastic brick is licensed under the terms of the he/him or they/them pronouns, at your choice. | 14:37:53 |
DolceTriade | In nix-tree, why are some packages blue? | 23:58:31 |
utdemir | Hmm. I think they are the ones with no dependencies. | 23:59:19 |
30 Apr 2025 |
DolceTriade | Ahh, thanks! Was curious if there was any special meaning behind it. | 07:17:06 |
| Lorenz changed their display name from apeioo to Lorenz. | 12:01:56 |
| @sheeldotme:matrix.org left the room. | 14:23:09 |