Skip to content

Instantly share code, notes, and snippets.

@hasufell hasufell/
Last active Aug 5, 2018

What would you like to do?

Nix sucks

Attempting to install NixOS

  1. installing NixOS, it fails to detect the UEFI partition on nixos-install, however installs, because that partition is obviously mounted, but doesn't record it in hardware-configuration.nix. Changing configuration after reboot seems to work, but the new configuration never shows up in the boot menu and is never booted. Silent failure, no error handling, wasted hours of debugging and rebooting.
  2. Trying to mix xfce4 with i3 fails, xfce session is never started. Fixing it requires special configuration and even changing the display manager, because the default has a hack to find sessions, which is broken, so you cannot choose "xfce+i3".
  3. Suspend and hibernate is broken.
  4. Setting up vim becomes a huge exercise in bug-hunting and configuration
    • First, vims default python is 2, breaking a lot of recent plugins. Setting it to 3 becomes a long quest in reading through ML posts and SO questions with odd configurations as answers. There is a wiki page about vim in nixos, but it's useless. In the end, it's just about setting an undocumented override.
    • odd bugs with delimiteMate, had to set g:delimiteMate_expand_cr = 0 for errors to stop
    • python-neovim is used by roxma/vim-hug-neovim-rpc, which is a vim plugin. However installing it doesn't have any affect in vim. Vim cannot see the python module. Asking in #nixos there is no simple solution. Either you recreate all of your vim configuration as nix configuration or you apply odd hacks, or you just accept that python handling in nix is fundamentally screwed and switch to non-python plugins.

General remarks

  • configuration complexity is through the roof
    • configuration is also inconsistent and may break between releases (or earlier, especially non-core things)
    • configuration abstraction is often poorly chosen, there are no policies about how to model configuration, no enforced rules, no consistency checks, nothing, it's just packaging anarchy
  • documentation exists, but is either bloated, lacking information or just unstructured (you end up on gist pages or ML threads, where people explain things, e.g. on how to set up luks encryption)
  • tooling is inconsistent and scattered, almost as bad as in FreeBSD. Some tools seem to do the same thing at first glance, but really don't. Some tools still exists, but shouldn't be used. There is no documentation on how exactly to use these tools and what the gotchas are.
  • there is no tool to see the options of a package (seriously?)
  • relies on PATH hacks and symlinks, which breaks everything that isn't done through nix, especially python and friends
  • packaging for nix is an exercise of fixing build systems, because every single path is non-fhs
  • binaries are patched and they are not portable... at all.
  • the abstraction in general leaks, it is neither consistent, nor complete and doesn't rely on a well-defined API, but on implementation details of unix systems
  • if that abstraction is broken or doesn't work, you are screwed, because now you cannot just debug and fix the atomic part of your system that doesn't work, now you have to debug why the nix abstraction doesn't work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.