Skip to content

feat: implement system.autoUpgrade module for periodic upgrades#436

Draft
jfroche wants to merge 5 commits intomainfrom
autoupgrade
Draft

feat: implement system.autoUpgrade module for periodic upgrades#436
jfroche wants to merge 5 commits intomainfrom
autoupgrade

Conversation

@jfroche
Copy link
Copy Markdown
Member

@jfroche jfroche commented Mar 25, 2026

Fixes #253

@jfroche jfroche linked an issue Mar 25, 2026 that may be closed by this pull request
description = "System Manager Upgrade";

restartIfChanged = false;
unitConfig.X-StopOnRemoval = false;
Copy link
Copy Markdown
Contributor

@commiterate commiterate Mar 26, 2026

Choose a reason for hiding this comment

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

X-StopOnRemoval isn't an actual systemd unit option. Rather it's a NixOS-specific lifecycle option.

At least from what I can tell, system-manager's systemd unit diffing is handled by system-manager-engine which would need to be updated to support the NixOS-specific lifecycle options.

In this case we need X-StopOnRemoval so the system-manager-upgrade unit execution doesn't kill itself mid-upgrade.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Right we need to implement both extra flags. I am looking at this.

@jfroche jfroche marked this pull request as draft March 26, 2026 08:29
jfroche added a commit that referenced this pull request Mar 27, 2026
We parse the directive from the unit file text and skip restarting the service if X-RestartIfChanged=false is set

required for #436
jfroche added a commit that referenced this pull request Mar 27, 2026
We parse the directive from the unit file text and skip restarting the service if X-RestartIfChanged=false is set

required for #436
Enable users to bypass the flake evaluation cache and fetch remote
flakes fresh when building a system-manager generation.

Fixes #129
Required for #253
@jfroche jfroche force-pushed the build-with-refresh branch from 5652319 to 70a5d11 Compare April 7, 2026 10:56
Avoid passing multiple related parameters (flake_uri and refresh) separately to build functions.
@jfroche jfroche force-pushed the build-with-refresh branch from f592f37 to 181a420 Compare April 7, 2026 11:44
@jfroche jfroche force-pushed the build-with-refresh branch from 181a420 to bb04f57 Compare April 7, 2026 11:46
Base automatically changed from build-with-refresh to main April 7, 2026 14:23
jfroche added a commit that referenced this pull request Apr 8, 2026
We parse the directive from the unit file text and skip restarting the service if X-RestartIfChanged=false is set

required for #436
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.

system.autoUpgrade.* Functionality

2 participants