Skip to content

Improve deployment error handling and disable vim#55

Open
AronNovak wants to merge 2 commits intodigitallyinduced:masterfrom
AronNovak:deploy-fixes
Open

Improve deployment error handling and disable vim#55
AronNovak wants to merge 2 commits intodigitallyinduced:masterfrom
AronNovak:deploy-fixes

Conversation

@AronNovak
Copy link
Copy Markdown
Contributor

@AronNovak AronNovak commented Jan 28, 2026

Before the config change, deploy-to-nixos failed with:

       Failed assertions:
       - {option}`programs.vim.defaultEditor` requires {option}`programs.vim.enable` to be set to true.

NixOS 25.05 added this assertion. The IHP module sets programs.vim.defaultEditor = true, so we override it with mkForce false instead of enabling vim (which isn't needed for deployment).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@amitaibu
Copy link
Copy Markdown
Collaborator

- {option}programs.vim.defaultEditor requires {option}programs.vim.enable to be set to true.

I think we should ideally find how to disable vim entirely, as it shouldn't be needed for the app's deployment

Override IHP's programs.vim.defaultEditor with mkForce false.
NixOS 25.05 added assertion requiring vim.enable when defaultEditor is true.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@AronNovak AronNovak changed the title Improve deployment error handling and add vim to prevent deployment fatal error Improve deployment error handling and disable vim Jan 28, 2026
@AronNovak
Copy link
Copy Markdown
Contributor Author

@amitaibu Right, I simplified the solution based on this, it works as well.

@amitaibu amitaibu requested review from Copilot and mpscholten and removed request for mpscholten January 28, 2026 13:29
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates NixOS production configuration and CI deploy scripting to avoid NixOS 25.05 vim assertions and provide clearer deployment failure reporting.

Changes:

  • Force programs.vim.defaultEditor = false in the production NixOS host config to override the IHP module’s default and satisfy the NixOS 25.05 assertion.
  • Improve GitHub Actions deploy step failure handling by enabling strict shell behavior and emitting a GitHub Actions ::error:: annotation on failure.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Config/nix/hosts/production/configuration.nix Overrides programs.vim.defaultEditor to prevent the NixOS 25.05 assertion from breaking deployment.
.github/workflows/test.yml Adds stricter shell settings and a clearer error annotation when deploy-to-nixos fails.

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

@mpscholten
Copy link
Copy Markdown
Member

I think we should rather updates this one here: https://github.com/digitallyinduced/ihp/blob/master/NixSupport/nixosModules/appWithPostgres.nix#L23 because that's the actual source of vim here 👍

@amitaibu
Copy link
Copy Markdown
Collaborator

@copilot address #55 (comment)

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.

4 participants