profile-sync-daemon: refactor nixos module