Nickel-based nanoporous electrodes for water treatment