Skip to content
Browse files

nixos/oxidized: Use symlinks for config files

The old `cp` suffers from a permission issue on the 2nd start of the
service. The files were copied from the read-only nix store. On the 2nd
start of the service the `cp` failed.
The new version force creates a symlink which does not suffer from this.

(cherry picked from commit 02dfc07)
  • Loading branch information...
fadenb authored and WilliButz committed Aug 14, 2019
1 parent ce7ed91 commit 364e1a8ca9170ab12bddbfa701be412494312825
Showing with 2 additions and 2 deletions.
  1. +2 −2 nixos/modules/services/admin/oxidized.nix
@@ -97,8 +97,8 @@ in

preStart = ''
mkdir -p ${cfg.dataDir}/.config/oxidized
cp -v ${cfg.routerDB} ${cfg.dataDir}/.config/oxidized/router.db
cp -v ${cfg.configFile} ${cfg.dataDir}/.config/oxidized/config
ln -f -s ${cfg.routerDB} ${cfg.dataDir}/.config/oxidized/router.db
ln -f -s ${cfg.configFile} ${cfg.dataDir}/.config/oxidized/config

serviceConfig = {

0 comments on commit 364e1a8

Please sign in to comment.
You can’t perform that action at this time.