refactor configuration of nix