Add simple authentication logic for nix.