Using the theory of large deviations, macroscopic fluctuation theory provides a framework to understand the behavior of nonequilibrium dynamics and steady states in diffusive systems. We extend this framework to a minimal model of a nonequilibrium nondiffusive system, specifically an open linear network on a finite graph. We explicitly calculate the dissipative bulk and boundary forces that drive the system towards the steady state, and the nondissipative bulk and boundary forces that drive the system in orbits around the steady state. Using the fact that these forces are orthogonal in a certain sense, we provide a decomposition of the large-deviation cost into dissipative and nondissipative terms. We establish that the purely nondissipative force turns the dynamics into a Hamiltonian system. These theoretical findings are illustrated by numerical examples.