Skip to content

Remove stale 99-omarchy-nofile.conf drop-ins via migration#6173

Open
Pegorim wants to merge 1 commit into
basecamp:quattrofrom
Pegorim:fix/remove-stale-nofile-dropin
Open

Remove stale 99-omarchy-nofile.conf drop-ins via migration#6173
Pegorim wants to merge 1 commit into
basecamp:quattrofrom
Pegorim:fix/remove-stale-nofile-dropin

Conversation

@Pegorim

@Pegorim Pegorim commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

On upgraded systems, /etc/systemd/{system,user}.conf.d/99-omarchy-nofile.conf remains behind and uses the key DefaultLimitNOFILESoft, which is not a valid systemd [Manager] setting. systemd rejects it at manager load on every boot:

/etc/systemd/system.conf.d/99-omarchy-nofile.conf: Unknown key 'DefaultLimitNOFILESoft' in section [Manager], ignoring.
/etc/systemd/user.conf.d/99-omarchy-nofile.conf: Unknown key 'DefaultLimitNOFILESoft' in section [Manager], ignoring.

These were superseded by 20-omarchy-nofile.conf (which correctly uses DefaultLimitNOFILE=65536:524288), but the 99- files are unowned by any package (pacman -Qo reports no owner), so upgrades never remove them and they keep spamming the journal.

Fix

Adds a migration that removes the orphaned 99- drop-ins from both system.conf.d and user.conf.d, then reloads the manager. The 20- drop-in already sets the limit, so no functional change to the NOFILE limits.

Testing

Observed on a 4.0-alpha (quattro) system upgraded from an earlier build (14 such errors per boot). After running the migration the errors are gone and 20-omarchy-nofile.conf continues to provide the limit.

The 99-omarchy-nofile.conf drop-ins used `DefaultLimitNOFILESoft`, which
is not a valid systemd [Manager] setting. systemd rejects it at manager
load on every boot:

  /etc/systemd/system.conf.d/99-omarchy-nofile.conf: Unknown key
  'DefaultLimitNOFILESoft' in section [Manager], ignoring.

They were superseded by 20-omarchy-nofile.conf (which correctly uses
`DefaultLimitNOFILE=65536:524288`), but the 99- files are unowned by any
package and linger on upgraded systems, spamming the journal every boot.

Add a migration that removes the orphaned drop-ins from both
system.conf.d and user.conf.d. The 20- drop-in already sets the limit.

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 5, 2026 23:05

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 820306b9a3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread migrations/1783292001.sh
/etc/systemd/system.conf.d/99-omarchy-nofile.conf \
/etc/systemd/user.conf.d/99-omarchy-nofile.conf; do
if [[ -f $f ]]; then
as_root rm -f "$f" && removed=1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Abort when privileged drop-in removal fails

If the privileged rm fails here (for example the user cancels sudo authentication, sudo is unavailable, or one of the two removals errors), Bash does not trigger errexit because the command is on the left side of &&; the script can then exit 0 with the stale file still present. Since bin/omarchy-migrate touches the migration marker immediately after a 0 exit, that user will not be prompted to retry this migration, so the boot-time systemd warning remains permanently until manually fixed.

Useful? React with 👍 / 👎.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a per-user migration to clean up orphaned systemd manager drop-ins (99-omarchy-nofile.conf) left behind on upgraded systems, preventing repeated “Unknown key DefaultLimitNOFILESoft” journal noise at boot.

Changes:

  • Add a migration that deletes stale /etc/systemd/{system,user}.conf.d/99-omarchy-nofile.conf drop-ins when present.
  • Attempt to reload systemd after removal to avoid requiring a reboot.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread migrations/1783292001.sh
Comment on lines +13 to +19
as_root() {
if (( EUID == 0 )); then
"$@"
else
sudo "$@"
fi
}
Comment thread migrations/1783292001.sh
Comment on lines +25 to +27
if [[ -f $f ]]; then
as_root rm -f "$f" && removed=1
fi
Comment thread migrations/1783292001.sh
Comment on lines +30 to +32
if (( removed )); then
as_root systemctl daemon-reload >/dev/null 2>&1 || true
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants