anchor.diff:        environment.PYTHONPATH = makeSearchPathOutput "lib" pkgs.python.sitePackages [ pluginsEnv ];
   
         preStart = ''
  -        mkdir -p "${cfg.stateDir}"
           if [ -e "${cfg.stateDir}/config.yaml" ]; then
             ${pkgs.yaml-merge}/bin/yaml-merge "${cfg.stateDir}/config.yaml" "${cfgUpdate}" > "${cfg.stateDir}/config.yaml.tmp"
             mv "${cfg.stateDir}/config.yaml.tmp" "${cfg.stateDir}/config.yaml"
  
positive.code:         gid = config.ids.gids.octoprint;
        });
  
      systemd.services.octoprint = {
        description = "OctoPrint, web interface for 3D printers";
        wantedBy = [ "multi-user.target" ];
  
negative.code:           cp "${cfgUpdate}" "${cfg.stateDir}/config.yaml"
            chmod 600 "${cfg.stateDir}/config.yaml"
          fi
        '';
  
        serviceConfig = {
          ExecStart = "${pkgs.octoprint}/bin/octoprint serve -b ${cfg.stateDir}";
          User = cfg.user;
          Group = cfg.group;
        };
      };
  
  