Hacker symbol

December 8, 2020 ~ 1 min read

Declaring NixOS modules gotchas


Just a compilation of gotchas I have bumped into.

{
lib,
...
}: with lib; {
    # You need to have a larger attribute name,
    such as "zfs-root" or "within"
    options.zfs-root.boot.enable = mkEnableOption "Enable zfs-root boot option";
    # This one won't work!
    options.zfs-root.enable = mkEnableOption "Enable zfs-root boot option";
}

Sebastian BolaƱos

Hi, I'm Sebastian. I'm a software developer from Costa Rica. You can follow me on Twitter. I enjoy working on distributed systems.