-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How would you automate updating vscode extensions? #13
Comments
Generally speaking, I rarely update the entire flake.lock. I will update vscode extension regularly. This step is completed through github actions. |
Can you share your github action for how you update your extensions? Is it a pull request that yo occasionally accept and then pull down your repo and rebuild your HM config? |
just like this: name: CI
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 5"
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Install Nix
uses: cachix/install-nix-action@v18
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- run: cargo +nightly install --git https://github.com/cathaysia/nix4vscode
- name: Update vscode extension
run: |
bash -c 'cd home/dot_config/home-manager && nix flake update "nix-vscode-extensions"'
bash -c 'nix4vscode home/dot_config/home-manager/config.toml -o home/dot_config/home-manager/config/vscode_plugins.nix'
- uses: EndBug/add-and-commit@v9
with:
author_name: bot
author_email: [email protected]
commit: --signoff
message: "feat(vscode): Update vscode extension" |
Thank you for sharing! The only thing I need to do manually is make sure that the |
I'm considering using this project instead of the old extensions packaged in nixpkgs in my home-manager standalone config.
It seems that the steps to update the extensions would look like this:
nix flake update
rev
ofnixpkgs
from theflake.lock
https://github.com/NixOS/nixpkgs/blob/e92039b55bcd58469325ded85d4f58dd5a4eaf58/pkgs/applications/editors/vscode/vscode.nix#L43
vscode_version
inconfig.toml
with version from step 3cargo run -- config.toml
home-manager switch --flake .
Is there a more convenient way to do this?
The text was updated successfully, but these errors were encountered: