Compare commits

...

9 commits

Author SHA1 Message Date
github-actions[bot]
cae66c4d1d automated: Update flake.lock
Some checks failed
Perform checks / formatting (push) Successful in 1m8s
Perform checks / nix_flake_check (push) Successful in 1m16s
Perform checks / nix_build (push) Failing after 20s
- The following Nix Flake inputs were updated:

```
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/d3c42f187194c26d9f0309a8ecc469d6c878ce33?narHash=sha256-cHar1vqHOOyC7f1%2BtVycPoWTfKIaqkoe1Q6TnKzuti4%3D' (2024-12-17)
  → 'github:NixOS/nixpkgs/634fd46801442d760e09493a794c4f15db2d0cbb?narHash=sha256-NYVcA06%2BblsLG6wpAbSPTCyLvxD/92Hy4vlY9WxFI1M%3D' (2024-12-27)
```

Auto-generated by [update.yml][1] with the help of
[create-pull-request][2].

[1]: https://forgejo.stefka.eu/jiriks74/nix.nvim/src/branch/main/.github/workflows/update.yml
[2]: https://forgejo.stefka.eu/jiriks74/create-pull-request
2024-12-29 03:00:19 +01:00
aa027982c7
fix(ci/update): Update on Saturday
Some checks failed
Perform checks / nix_build (push) Has been cancelled
Perform checks / nix_flake_check (push) Has been cancelled
Perform checks / formatting (push) Has been cancelled
so that the action for jiriks74/os.home.nix can pull this after it's
merged on Sunday
2024-12-29 02:59:37 +01:00
github-actions[bot]
8248c71bd8 automated: Update flake.lock
All checks were successful
Perform checks / formatting (push) Successful in 1m8s
Perform checks / nix_flake_check (push) Successful in 1m14s
Perform checks / nix_build (push) Successful in 1m58s
- The following Nix Flake inputs were updated:

```
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/4633a7c72337ea8fd23a4f2ba3972865e3ec685d?narHash=sha256-2ThgXBUXAE1oFsVATK1ZX9IjPcS4nKFOAjhPNKuiMn0%3D' (2024-11-25)
  → 'github:NixOS/nixpkgs/d3c42f187194c26d9f0309a8ecc469d6c878ce33?narHash=sha256-cHar1vqHOOyC7f1%2BtVycPoWTfKIaqkoe1Q6TnKzuti4%3D' (2024-12-17)
• Updated input 'presence-nvim':
    'github:jiriks74/presence.nvim/df0a0b52cd0799e99d1b76805d1357ae9c0d017d?narHash=sha256-NuoXsCOA5Uz7XOtC5B1pIXLytLaod6wUzrE%2Bm5uEHcs%3D' (2024-10-07)
  → 'github:jiriks74/presence.nvim/c850b9e245f310e040478ab54808c7ce098919ed?narHash=sha256-NuoXsCOA5Uz7XOtC5B1pIXLytLaod6wUzrE%2Bm5uEHcs%3D' (2024-12-13)
```

Auto-generated by [update.yml][1] with the help of
[create-pull-request][2].

[1]: https://forgejo.stefka.eu/jiriks74/nix.nvim/src/branch/main/.github/workflows/update.yml
[2]: https://forgejo.stefka.eu/jiriks74/create-pull-request
2024-12-19 11:23:25 +01:00
f2df89bcf7
fix(ci): Remove nix cache action as it barely works
All checks were successful
Perform checks / formatting (push) Successful in 1m5s
Perform checks / nix_flake_check (push) Successful in 1m15s
Perform checks / nix_build (push) Successful in 2m16s
It takes 11 minutes to cache everything on a otherwise 2 minute job.
Nix doesn't even pull from it most of the time.
2024-12-19 11:17:47 +01:00
c886aca5d4
fix(ci/update): Drop cache action
All checks were successful
Perform checks / formatting (push) Successful in 1m4s
Perform checks / nix_flake_check (push) Successful in 1m4s
Perform checks / nix_build (push) Successful in 6m13s
It's useless for just updating nix flake inputs
2024-12-16 03:45:19 +01:00
83dab209c0
fix: Use custom action for updating flake.lock
Some checks failed
Perform checks / nix_flake_check (push) Waiting to run
Perform checks / nix_build (push) Waiting to run
Perform checks / formatting (push) Has been cancelled
2024-12-16 03:42:39 +01:00
ed72f266de
fix(ci): Use full URLs for CI Actions
All checks were successful
Perform checks / formatting (push) Successful in 1m13s
Perform checks / nix_flake_check (push) Successful in 52s
Perform checks / nix_build (push) Successful in 2m49s
Forgejo uses https://code.forgejo.org not https://github.com as the
default path
2024-12-13 13:12:20 +01:00
64564114ff
fix(ci/update): Rename secrets to represent source host
Some checks failed
Perform checks / formatting (push) Failing after 2s
Perform checks / nix_flake_check (push) Failing after 2s
Perform checks / nix_build (push) Failing after 2s
2024-12-13 13:08:12 +01:00
a0aae4711d
fix(plugin/overseer,dap): Overseer not loading, simplify DAP config (a bit)
Some checks failed
Perform checks / formatting (push) Successful in 43s
Perform checks / nix_flake_check (push) Successful in 48s
Perform checks / nix_build (push) Failing after 19s
Update `flake.lock` / update_lockfile (push) Failing after 1m27s
2024-12-03 03:12:40 +01:00
5 changed files with 85 additions and 43 deletions

View file

@ -11,13 +11,9 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install nix - name: Install nix
uses: DeterminateSystems/nix-installer-action@main uses: https://github.com/DeterminateSystems/nix-installer-action@main
- name: Setup Action cache for nix
uses: DeterminateSystems/magic-nix-cache-action@main
with:
fail-mode: true
- name: Check Nix flake inputs - name: Check Nix flake inputs
uses: DeterminateSystems/flake-checker-action@v4 # This action uses: https://github.com/DeterminateSystems/flake-checker-action@v4 # This action
- name: Run nix fmt - name: Run nix fmt
run: nix fmt -- --check . run: nix fmt -- --check .
@ -26,13 +22,9 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install nix - name: Install nix
uses: DeterminateSystems/nix-installer-action@main uses: https://github.com/DeterminateSystems/nix-installer-action@main
- name: Setup Action cache for nix
uses: DeterminateSystems/magic-nix-cache-action@main
with:
fail-mode: true
- name: Check Nix flake inputs - name: Check Nix flake inputs
uses: DeterminateSystems/flake-checker-action@v4 # This action uses: https://github.com/DeterminateSystems/flake-checker-action@v4 # This action
- name: Run nix flake check - name: Run nix flake check
run: nix flake check run: nix flake check
@ -41,12 +33,8 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install nix - name: Install nix
uses: DeterminateSystems/nix-installer-action@main uses: https://github.com/DeterminateSystems/nix-installer-action@main
- name: Setup Action cache for nix
uses: DeterminateSystems/magic-nix-cache-action@main
with:
fail-mode: true
- name: Check Nix flake inputs - name: Check Nix flake inputs
uses: DeterminateSystems/flake-checker-action@v4 # This action uses: https://github.com/DeterminateSystems/flake-checker-action@v4 # This action
- name: Build nvim - name: Build nvim
run: nix build .\#default run: nix build .\#default

View file

@ -2,7 +2,7 @@ name: Update `flake.lock`
on: on:
workflow_dispatch: workflow_dispatch:
schedule: schedule:
- cron: '0 0 * * 0' # runs weekly on Sunday at 00:00 - cron: '0 0 * * 6' # runs weekly on Saturday at 00:00
jobs: jobs:
update_lockfile: update_lockfile:
@ -11,20 +11,72 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install nix - name: Install nix
uses: DeterminateSystems/nix-installer-action@main uses: https://github.com/DeterminateSystems/nix-installer-action@main
- name: Setup Action cache for nix
uses: DeterminateSystems/magic-nix-cache-action@main
with:
fail-mode: true
- name: Update flake.lock - name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@main id: update
run: |
nix flake update 2> >(tee /dev/stderr) | awk '
/^• Updated input/ {in_update = 1; print; next}
in_update && !/^warning:/ {print}
/^$/ {in_update = 0}
' > update.log
echo "UPDATE_LOG<<EOF" >> $GITHUB_ENV
cat update.log >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
rm update.log
- name: Write PR body template
uses: https://github.com/DamianReeves/write-file-action@v1.3
with: with:
# inputs: dzgui dzgui-testing # We'll see whether I want to limit the updates to dzgui path: pr_body.template
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }} contents: |
pr-title: "Update flake.lock" - The following Nix Flake inputs were updated:
pr-assignees: jiriks74
pr-labels: | ```
flake.lock ${{ env.UPDATE_LOG }}
automated ```
Auto-generated by [update.yml][1] with the help of
[create-pull-request][2].
[1]: https://forgejo.stefka.eu/jiriks74/nix.nvim/src/branch/main/.github/workflows/update.yml
[2]: https://forgejo.stefka.eu/jiriks74/create-pull-request
- name: Generate PR body
uses: pedrolamas/handlebars-action@v2.4.0 # v2.4.0
with:
files: "pr_body.template"
output-filename: "pr_body.md"
- name: Save PR body
id: pr_body
uses: juliangruber/read-file-action@v1
with:
path: "pr_body.md"
- name: Remove temporary files
run: |
rm pr_body.template
rm pr_body.md
- name: Create Pull Request
id: create-pull-request
uses: https://forgejo.stefka.eu/jiriks74/create-pull-request@7174d368c2e4450dea17b297819eb28ae93ee645
with:
token: ${{ secrets.FORGEJO_TOKEN_FOR_UPDATES }}
body: ${{ steps.pr_body.outputs.content }}
author: '"github-actions[bot]" <github-actions[bot]@users.noreply.github.com>'
title: 'automated: Update `flake.lock`'
commit-message: |
automated: Update `flake.lock`
${{ steps.pr_body.outputs.content }}
branch: update-flake-lock
delete-branch: true
- name: Print PR number - name: Print PR number
run: echo Pull request number is ${{ steps.update.outputs.pull-request-number }}. run: |
echo "Pull request number is ${{ steps.create-pull-request.outputs.pull-request-number }}."
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

View file

@ -181,11 +181,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1732521221, "lastModified": 1735291276,
"narHash": "sha256-2ThgXBUXAE1oFsVATK1ZX9IjPcS4nKFOAjhPNKuiMn0=", "narHash": "sha256-NYVcA06+blsLG6wpAbSPTCyLvxD/92Hy4vlY9WxFI1M=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4633a7c72337ea8fd23a4f2ba3972865e3ec685d", "rev": "634fd46801442d760e09493a794c4f15db2d0cbb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -198,11 +198,11 @@
"presence-nvim": { "presence-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1728312592, "lastModified": 1734057239,
"narHash": "sha256-NuoXsCOA5Uz7XOtC5B1pIXLytLaod6wUzrE+m5uEHcs=", "narHash": "sha256-NuoXsCOA5Uz7XOtC5B1pIXLytLaod6wUzrE+m5uEHcs=",
"owner": "jiriks74", "owner": "jiriks74",
"repo": "presence.nvim", "repo": "presence.nvim",
"rev": "df0a0b52cd0799e99d1b76805d1357ae9c0d017d", "rev": "c850b9e245f310e040478ab54808c7ce098919ed",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -11,10 +11,12 @@ local root_files = {
'.git', '.git',
} }
local root = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1])
vim.lsp.start { vim.lsp.start {
name = 'clangd', name = 'clangd',
cmd = { 'clangd' }, cmd = { 'clangd' },
root_dir = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1]), root_dir = root,
capabilities = require('user.lsp').make_client_capabilities(), capabilities = require('user.lsp').make_client_capabilities(),
filetypes = { "c" }, filetypes = { "c" },
on_attach = function(client, bufnr) on_attach = function(client, bufnr)
@ -39,7 +41,7 @@ if vim.fn.executable('gdb') == 1 then
end end
-- DAP loads this automatically as of now. May be needed to load the debugger for asm? -- DAP loads this automatically as of now. May be needed to load the debugger for asm?
-- if require('user.file_exists').file_exists(vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1]) .. "/.vscode/launch.json") then -- if require('user.file_exists').file_exists(root .. "/.vscode/launch.json") then
-- require("dap.ext.vscode").load_launchjs(nil, { cppdbg = { "c", "cpp", "asm" } }) -- require("dap.ext.vscode").load_launchjs(nil, { cppdbg = { "c", "cpp", "asm" } })
-- require("dap.ext.vscode").load_launchjs(nil, { gdb = { "c", "cpp", "asm" } }) -- require("dap.ext.vscode").load_launchjs(nil, { gdb = { "c", "cpp", "asm" } })
-- end -- end

View file

@ -20,10 +20,10 @@ local root_files = {
'.git', '.git',
} }
local root = vim.fs.find(root_files, { upward = true })[1] local root = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1])
if root then if root then
if file_exists(root .. ".vscode/tasks.json") then if file_exists(root .. "/.vscode/tasks.json") then
require('overseer').setup({ require('overseer').setup({
strategy = { strategy = {
"toggleterm", "toggleterm",