{"record":{"id":"a54bf69b3d13cce2","repo":"jdx/mise","slug":"user-service-is-also-declared-in-bootstrap-l","errorCode":null,"errorMessage":"user service '{}' is also declared in [bootstrap.linux.systemd.units]; declare it once","messagePattern":"user service '(.+?)' is also declared in \\[bootstrap\\.linux\\.systemd\\.units\\]; declare it once","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/user_services.rs","lineNumber":281,"sourceCode":"\n/// Every user-scope service, validated, with names that collide with\n/// `[bootstrap.linux.systemd.units]` or `[bootstrap.macos.launchd.agents]`\n/// rejected (both would write the same unit or plist).\npub(crate) fn requests_from_config(config: &Config) -> Result<Vec<UserServiceRequest>> {\n    let requests = compose_user_declarations(config)?\n        .into_iter()\n        .map(|(name, (declaration, origin))| {\n            UserServiceRequest::from_toml(name, declaration, Some(origin))\n        })\n        .collect::<Result<Vec<_>>>()?;\n    if requests.is_empty() {\n        return Ok(requests);\n    }\n    let units = crate::system::systemd_from_config(config);\n    let agents = crate::system::launchd_from_config(config);\n    for request in &requests {\n        if units.iter().any(|unit| unit.name == request.name) {\n            bail!(\n                \"user service '{}' is also declared in [bootstrap.linux.systemd.units]; declare it once\",\n                request.name\n            );\n        }\n        if agents.iter().any(|agent| agent.name == request.name) {\n            bail!(\n                \"user service '{}' is also declared in [bootstrap.macos.launchd.agents]; declare it once\",\n                request.name\n            );\n        }\n    }\n    Ok(requests)\n}\n\n/// The mise executable a service definition may reference: the running\n/// binary unless it lives in a temporary or remote-bootstrap staging\n/// directory, else a `mise` on `PATH` outside those. Durability is judged\n/// by where the binary really is, but the path kept is the one found: a","sourceCodeStart":263,"sourceCodeEnd":299,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/user_services.rs#L263-L299","documentation":"requests_from_config found the same service name declared both as a user service and in [bootstrap.linux.systemd.units]. Both declarations would write the same unit file on top of each other, so the duplicate is rejected and mise asks for a single declaration.","triggerScenarios":"Thrown at src/system/user_services.rs:281 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Delete one of the duplicate declarations","Keep systemd/launchd units in their respective config sections only","Rename one service if both are genuinely needed"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}