Compare commits

..

No commits in common. "main" and "new-structure" have entirely different histories.

12 changed files with 68 additions and 305 deletions

View file

@ -1,67 +0,0 @@
name: setup-nix
inputs:
system:
type: string
required: true
sandbox:
type: string
default: "true"
runs:
using: composite
steps:
- name: reclaim space (linux)
if: runner.os == 'Linux'
uses: wimpysworld/nothing-but-nix@main
with:
hatchet-protocol: rampage
- name: reclaim space (darwin)
if: runner.os == 'macOS'
shell: bash
run: |
echo "::group::disk space (before)"
sudo df -h
echo "::endgroup::"
echo "::group::disable mds"
sudo mdutil -i off -a || echo "mdutil failed"
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist \
|| echo "launchctl unload failed"
echo "::endgroup::"
echo "Background space expansion started. /nix will grow as space becomes available."
sudo rm -rf \
/Applications/Xcode_* \
/Library/Developer/CoreSimulator \
/Library/Frameworks \
/Users/runner/.dotnet \
/Users/runner/.rustup \
/Users/runner/Library/Android \
/Users/runner/Library/Caches \
/Users/runner/Library/Developer/CoreSimulator \
/Users/runner/hostedtoolcache &
- name: install nix
uses: cachix/install-nix-action@v31
with:
# Putting build-dir in /nix is a workaround for https://github.com/wimpysworld/nothing-but-nix/issues/18
extra_nix_config: |
build-dir = /nix/build
sandbox = ${{ inputs.sandbox }}
system = ${{ inputs.system }}
- name: create build-dir
shell: bash
run: sudo mkdir -p /nix/build
- name: post setup-nix
if: runner.os == 'macOS'
uses: srz-zumix/post-run-action@v2
with:
shell: bash -e {0}
post-run: |
echo "::group::disk space (after)"
sudo df -h
echo "::endgroup::"

View file

@ -4,113 +4,46 @@ on:
push: push:
workflow_dispatch: workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
build: build:
strategy: runs-on: ubuntu-24.04
fail-fast: false
matrix:
system:
- x86_64-linux
- aarch64-linux
- x86_64-darwin
runs-on: ${{ matrix.system == 'x86_64-linux' && 'ubuntu-24.04'
|| matrix.system == 'aarch64-linux' && 'ubuntu-24.04-arm'
|| matrix.system == 'x86_64-darwin' && 'macos-latest' }}
steps: steps:
- uses: actions/checkout@v4 - name: Checkout the repository
uses: actions/checkout@v2
- name: setup nix - name: Install nix
uses: ./.github/actions/setup-nix uses: cachix/install-nix-action@v16
with:
system: ${{ matrix.system }}
- name: Login to tailscale
uses: tailscale/github-action@v3.2.3
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
hostname: ${{ matrix.system == 'x86_64-linux' && 'github-actions-x86-64-linux'
|| matrix.system == 'aarch64-linux' && 'github-actions-aarch64-linux'
|| matrix.system == 'x86_64-darwin' && 'github-actions-x86-64-darwin' }}
tags: tag:ci
# - name: Install and start Tailscale # TODO: add a binary cache
# run: | # - uses: cachix/cachix-action@v10
# # Start tailscaled daemon in background using nix shell # with:
# nix profile add nixpkgs#tailscale # name: YOURCACHE
# sudo tailscaled --state=mem: & # authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
# # Wait for daemon to be ready
# sleep 10
# # Connect using OAuth
# HOSTNAME="${{ matrix.system == 'x86_64-linux' && 'github-actions-x86-64-linux'
# || matrix.system == 'aarch64-linux' && 'github-actions-aarch64-linux'
# || matrix.system == 'x86_64-darwin' && 'github-actions-x86-64-darwin' }}"
# tailscale up \
# --authkey="${{ secrets.TS_OAUTH_SECRET }}?preauthorized=true&ephemeral=true" \
# --hostname="$HOSTNAME" \
# --advertise-tags="tag:ci" \
# --accept-routes
- name: Tailscale status
run: tailscale status || true
- name: Check if Attic endpoint is reachable
id: check_attic
run: |
if curl --connect-timeout 20 --silent --head http://wallfacer.curl-boga.ts.net:7080 | grep "200 OK"; then
echo "Attic endpoint is reachable"
echo "reachable=true" >> $GITHUB_OUTPUT
else
echo "Attic endpoint is not reachable"
echo "reachable=false" >> $GITHUB_OUTPUT
fi
- name: Curl the cache
run: |
curl --connect-timeout 20 --silent http://wallfacer.curl-boga.ts.net:7080/main/nix-cache-info || echo "Cache endpoint not reachable"
- name: Setup Attic cache
if: steps.check_attic.outputs.reachable == 'true'
uses: ryanccn/attic-action@v0.3.1
with:
endpoint: http://wallfacer.curl-boga.ts.net:7080
cache: main
token: ${{ secrets.ATTIC_TOKEN }}
- name: Check the flake - name: Check the flake
run: nix flake check --accept-flake-config run: nix flake check --accept-flake-config
- name: Build the Neovim Configuration - name: Pre-build the system configuration
run: nix build --accept-flake-config . -j3 run: nix build --accept-flake-config .
timeout-minutes: 300
continue-on-error: true
- name: Print out the size of /nix/store - name: Print out the size of /nix/store
run: du -sh /nix/store run: du -sh /nix/store
- name: Get the init.lua path - name: Get the init.lua path
if: matrix.system == 'x86_64-linux'
run: | run: |
init_path=$(grep "init=" result/bin/nixvim-print-init | awk -F'=' '{print $2}') init_path=$(grep "init=" result/bin/nixvim-print-init | awk -F'=' '{print $2}')
cp $init_path init.lua cp $init_path init.lua
- name: Upload the artifact - name: Upload the artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
if: matrix.system == 'x86_64-linux'
with: with:
name: neovim-configuration name: neovim-configuration
path: init.lua path: init.lua
- name: Publish the init.lua to an orphan github branch - name: Publish the init.lua to an orphan github branch
if: matrix.system == 'x86_64-linux'
run: | run: |
git config --global user.name github-actions git config --global user.name github-actions
git config --global user.email github-actions@github.com git config --global user.email github-actions@github.com
@ -119,7 +52,6 @@ jobs:
git add init.lua git add init.lua
git commit -m "Publish init.lua" git commit -m "Publish init.lua"
git push --force origin init-lua git push --force origin init-lua
git checkout main # switch back to main branch for graceful job ending
check-formatting: check-formatting:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04

View file

@ -19,31 +19,5 @@
autoindent = true; # Do clever autoindenting autoindent = true; # Do clever autoindenting
# TODO: i want to see 4 spaces when i press tab in python and 2 spaces in nix using setlocal # TODO: i want to see 4 spaces when i press tab in python and 2 spaces in nix using setlocal
# is it possible for me to set this per language? # is it possible for me to set this per language?
# folding
foldmethod = "expr";
foldexpr = "nvim_treesitter#foldexpr()";
foldlevel = 99; # Folds with a level higher than this number will be closed
foldcolumn = "1";
foldenable = true;
foldlevelstart = -1;
fillchars = {
horiz = "";
horizup = "";
horizdown = "";
vert = "";
vertleft = "";
vertright = "";
verthoriz = "";
eob = " ";
diff = "";
fold = " ";
foldopen = "";
foldclose = "";
msgsep = "";
};
}; };
} }

View file

@ -1,23 +0,0 @@
{
plugins.avante = {
lazyLoad.settings.event = ["DeferredUIEnter"];
settings = {
# provider = "ollama";
# provider = "claude";
providers = {
# claude = {
# endpoint = "https://api.anthropic.com";
# extra_request_body = {
# max_tokens = 4096;
# temperature = 0;
# };
# model = "claude-3-5-sonnet-20240620";
# };
ollama = {
endpoint = "http://localhost:11434";
model = "qwen2.5-coder:32b";
};
};
};
};
}

View file

@ -1,36 +1,6 @@
{ {
plugins.blink-cmp = { plugins.blink-cmp = {
settings = { settings = {
# snippets = {
# preset = "luasnip";
# };
sources = {
default = [
"lsp"
"path"
"buffer"
"copilot"
];
providers = {
copilot = {
async = true;
module = "blink-copilot";
name = "copilot";
score_offset = 100;
# Optional configurations
opts = {
max_completions = 3;
max_attempts = 4;
kind = "Copilot";
debounce = 750;
auto_refresh = {
backward = true;
forward = true;
};
};
};
};
};
}; };
}; };
} }

View file

@ -1,9 +1,16 @@
{lib, ...}: { {
imports = # settings of these plugins live in their respective files
lib.mapAttrsToList (name: _path: ./. + "/${name}") imports = [
(lib.filterAttrs (filename: kind: ./blink-cmp.nix
filename != "default.nix" && (kind == "regular" || kind == "directory")) ./cmp.nix
(builtins.readDir ./.)); ./comment.nix
./gitsigns.nix
./lsp.nix
./mini.nix
./oil.nix
./treesitter.nix
./which-key.nix
];
plugins = { plugins = {
# todo comments highlighter # todo comments highlighter
@ -46,7 +53,7 @@
mini.enable = true; # TODO look more into the mini plugin mini.enable = true; # TODO look more into the mini plugin
# cursor animation # cursor animation
smear-cursor.enable = false; smear-cursor.enable = true;
# add buffer tab plugin # add buffer tab plugin
bufferline.enable = true; bufferline.enable = true;
@ -65,17 +72,5 @@
# tip pop-up # tip pop-up
which-key.enable = true; which-key.enable = true;
# ai support
avante.enable = true;
# lazy loading provider
lz-n.enable = true;
# oil git status shower
oil-git-status.enable = true;
# blink copilot
blink-copilot.enable = true;
}; };
} }

View file

@ -7,9 +7,6 @@
view_options = { view_options = {
show_hidden = true; show_hidden = true;
}; };
win_options = {
signcolumn = "yes:2";
};
}; };
# add this keymaps only if oil plugin is enabled # add this keymaps only if oil plugin is enabled
keymaps = lib.mkIf config.plugins.oil.enable [ keymaps = lib.mkIf config.plugins.oil.enable [

View file

@ -1,6 +1,6 @@
{ {
plugins.treesitter = { plugins.treesitter = {
folding = true; # i dont like the way it starts neovim with everything folded # folding = true; # i dont like the way it starts neovim with everything folded
settings = { settings = {
ensure_installed = [ ensure_installed = [
"python" "python"

44
flake.lock generated
View file

@ -8,11 +8,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1760948891, "lastModified": 1749398372,
"narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=", "narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04", "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -53,16 +53,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1754860581, "lastModified": 1748294338,
"narHash": "sha256-EM0IE63OHxXCOpDHXaTyHIOk2cNvMCGPqLt/IdtVxgk=", "narHash": "sha256-FVO01jdmUNArzBS7NmaktLdGA5qA3lUMJ4B7a05Iynw=",
"owner": "NuschtOS", "owner": "NuschtOS",
"repo": "ixx", "repo": "ixx",
"rev": "babfe85a876162c4acc9ab6fb4483df88fa1f281", "rev": "cc5f390f7caf265461d4aab37e98d2292ebbdb85",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NuschtOS", "owner": "NuschtOS",
"ref": "v0.1.1", "ref": "v0.0.8",
"repo": "ixx", "repo": "ixx",
"type": "github" "type": "github"
} }
@ -76,11 +76,11 @@
"nmt": "nmt" "nmt": "nmt"
}, },
"locked": { "locked": {
"lastModified": 1756744433, "lastModified": 1742249870,
"narHash": "sha256-6BSEvkprwEQDQQgW5UH/1GkBPGM8M9+qX6o9ePslr6E=", "narHash": "sha256-U37ECk3zpfp92D3H0gzfWPyb5sf0RdOdublCq1zjq+w=",
"owner": "Gerschtli", "owner": "Gerschtli",
"repo": "nix-formatter-pack", "repo": "nix-formatter-pack",
"rev": "63b748033a3fa0af80f8ed908521122e48858c30", "rev": "fe5b4498e3161191bd93fe0683dff347f6f689df",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -91,11 +91,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1761373498, "lastModified": 1749285348,
"narHash": "sha256-Q/uhWNvd7V7k1H1ZPMy/vkx3F8C13ZcdrKjO7Jv7v0c=", "narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6a08e6bb4e46ff7fcbb53d409b253f6bad8a28ce", "rev": "3e3afe5174c561dee0df6f2c2b2236990146329f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -107,11 +107,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1761656231, "lastModified": 1749523198,
"narHash": "sha256-EiED5k6gXTWoAIS8yQqi5mAX6ojnzpHwAQTS3ykeYMg=", "narHash": "sha256-How2kQw0psKmCdXgojc95Sf3K5maHB3qfINxTZFCAPM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e99366c665bdd53b7b500ccdc5226675cfc51f45", "rev": "cdc68935eba9f86d155585fdf6f17af6824f38ac",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -129,11 +129,11 @@
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1761744315, "lastModified": 1749761870,
"narHash": "sha256-OknzyEoI+VEYgk/FWMyx3tvjb/MPPyqS+G/aemDz51w=", "narHash": "sha256-y+rCuxTylur4k2MbL8cJwOR3pHIamCxp8xG9Vuhwvgw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "6233fc6b2c3f203d8a5970f4a2c1df5777902717", "rev": "18d838e88945b554d059db5f1fff1daed4b7bf8f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -184,11 +184,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1761730856, "lastModified": 1749531675,
"narHash": "sha256-t1i5p/vSWwueZSC0Z2BImxx3BjoUDNKyC2mk24krcMY=", "narHash": "sha256-UB8Mc88rW9frjpJ1Fj2ro7f07Gg8dX3uVXvMXnFR4CE=",
"owner": "NuschtOS", "owner": "NuschtOS",
"repo": "search", "repo": "search",
"rev": "e29de6db0cb3182e9aee75a3b1fd1919d995d85b", "rev": "4029d450d0266909ee52775849b7da54e79b328e",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -1,15 +1,6 @@
{ {
description = "My custom neovim configuration that has been mixed and matched from various sources"; description = "My custom neovim configuration that has been mixed and matched from various sources";
nixConfig = {
extra-substituters = [
"https://nix-community.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# https://gerschtli.github.io/nix-formatter-pack/nix-formatter-pack-options.html # https://gerschtli.github.io/nix-formatter-pack/nix-formatter-pack-options.html
@ -57,15 +48,9 @@
inherit pkgs self; inherit pkgs self;
}; };
}; };
in rec { in {
default = mkNixvim {}; default = mkNixvim {};
lite = mkNixvim {withLSP = false;}; lite = mkNixvim {withLSP = false;};
default-print-init = default.config.build.printInitPackage;
lite-print-init = lite.config.build.printInitPackage;
default-init = default.config.build.initSource;
lite-init = lite.config.build.initSource;
}); });
}; };
} }