Compare commits

...

77 commits
v0.5.0 ... main

Author SHA1 Message Date
8f08a58bea update flake.lock 2025-10-29 23:59:27 +03:00
8efd247c60 dont use my unstable cache for now 2025-09-24 09:47:54 +03:00
59e851205c update flake.lock 2025-09-24 09:47:43 +03:00
606edf4794 Revert "a man can dream"
This reverts commit ed33e038a7.
2025-09-18 08:51:16 +03:00
b9498fefd5 Revert "dont check"
This reverts commit 9407917da8.
2025-09-18 08:51:11 +03:00
b158f155aa much better 2025-09-17 13:56:56 +03:00
9407917da8 dont check 2025-09-17 13:48:32 +03:00
ed33e038a7 a man can dream 2025-09-17 13:45:11 +03:00
6d22222568 first try this 2025-09-17 13:39:07 +03:00
3f00007a1f imma try it anyway 2025-09-17 13:34:46 +03:00
8901f583b4 i dont see why this shouldnt work 2025-09-17 13:30:46 +03:00
30cec2b836 try all root 2025-09-17 13:26:47 +03:00
a2420c650f Revert "use environment"
This reverts commit 1473b3dfe9.
2025-09-17 13:25:03 +03:00
1473b3dfe9 use environment 2025-09-17 13:23:27 +03:00
88d424e8f1 try full path 2025-09-17 13:20:28 +03:00
d47e9c7817 verbose 2025-09-17 13:18:16 +03:00
10d41e635d nix shell it is 2025-09-16 15:02:35 +03:00
15c363d07b profile install should allow this 2025-09-16 15:01:19 +03:00
719383c098 use nix to install tailscale 2025-09-16 14:47:38 +03:00
b50ee232bb Why macos is so shitty 2025-09-16 14:34:46 +03:00
5163585282 errrrrrrrr 2025-09-16 14:24:16 +03:00
fb62d9d804 tailscale status 2025-09-16 14:14:13 +03:00
66b069b50d This is it 2025-09-16 13:56:45 +03:00
c63baacd9c add debug 2025-09-16 13:51:22 +03:00
1bfe1d1f00 dont do this 3 times simultaniously 2025-09-16 13:49:50 +03:00
08c76f13db why did i do this 2025-09-16 13:43:32 +03:00
362bec5bab formatting 2025-09-16 13:27:40 +03:00
7a25a807d7 much better 2025-09-16 13:13:30 +03:00
eb926f2bd0 i am done 2025-09-16 13:13:21 +03:00
aafec37783 add nixConfig 2025-09-16 11:51:05 +03:00
dbd99ddcca update checkout 2025-09-16 11:50:49 +03:00
05af1a15f1 use custom action 2025-09-15 17:03:56 +03:00
c813cb28ad simpler haha 2025-09-15 16:59:43 +03:00
3b19d429ce weird syntax 2025-09-15 16:56:41 +03:00
5ce23054d9 does this work 2025-09-15 16:54:21 +03:00
8d5c8245c2 try 2025-09-15 16:52:42 +03:00
7020149e6d no concurrency 2025-09-15 16:45:34 +03:00
05672d4b09 will this work? 2025-09-15 16:42:54 +03:00
009dfd4cd5 was this the problem 2025-09-15 16:29:36 +03:00
82cad3c0dd i wonder 2025-09-15 16:26:34 +03:00
6d14def506 add attic 2025-09-15 16:21:02 +03:00
73e5ab059f formatting 2025-09-15 16:00:11 +03:00
f83a04eba7 wtf 2025-09-15 15:51:49 +03:00
04d828f9d8 no tag 2025-09-15 15:37:39 +03:00
1080b3a8cc add tailscale 2025-09-15 15:36:09 +03:00
db9189edfc update flake.lock 2025-09-06 11:38:41 +03:00
3ddc546f8d update flake.lock 2025-09-01 08:46:32 +03:00
d8efd81cbd set providers 2025-08-19 14:51:47 +03:00
17c6b291f2 formatting 2025-08-19 03:25:33 +03:00
d78b9bc624 luasnip is not working as of now 2025-08-18 23:29:44 +03:00
e98be4fd93 enable copilot 2025-08-18 21:28:41 +03:00
b1a51a416d fix snippets 2025-08-18 21:28:29 +03:00
32635ed048 i originally wanted this 2025-08-18 19:48:41 +03:00
a13d094773 add blink sources 2025-08-18 17:24:08 +03:00
b5d81a5a69 show configurations also 2025-08-18 15:25:10 +03:00
a1c5000b5d update flake.lock 2025-08-18 14:39:11 +03:00
3b0fc7da4d a bit better folding 2025-08-11 23:51:09 +03:00
5a5d5e3945 enable folding 2025-08-11 22:07:24 +03:00
a503bbf92c update flake.lock 2025-08-11 21:49:17 +03:00
defe8b2946 update flake.lock 2025-07-26 16:37:07 +03:00
fa9212f819 update flake.lock 2025-07-17 18:33:47 +03:00
fea71cdd7e update flake.lock 2025-07-12 21:29:44 +03:00
a74ee44f5b no smear for now 2025-07-02 01:37:01 +03:00
8c2428ab43 update flake.lock 2025-07-02 01:36:12 +03:00
ef8b21d873 add oil git support 2025-06-19 15:42:45 +03:00
657fba9246 this causes problems for some reason 2025-06-19 12:37:26 +03:00
d827b46492 update flake.lock 2025-06-19 12:26:27 +03:00
6f1f0e6ea7 formatting 2025-06-19 12:11:20 +03:00
b4db8de9b0 add lazy loading support 2025-06-19 03:19:33 +03:00
bb8391d7d9 avante saves the day 2025-06-19 03:13:19 +03:00
a5cf35dec0 add avante 2025-06-19 02:53:56 +03:00
c25f5b6839 i dont want to just type each plugin name in the import list 2025-06-19 02:53:07 +03:00
0e214b7d96 update flake.lock 2025-06-19 02:25:47 +03:00
b4f3b20e42 Merge pull request 'new-structure' (#1) from new-structure into main
Reviewed-on: #1
2025-06-14 02:09:30 +03:00
d459d592eb new imports 2025-06-14 01:49:05 +03:00
9870cb1236 move default.nix 2025-06-14 01:47:32 +03:00
608bf58ff8 move plugins folder 2025-06-14 01:45:40 +03:00
20 changed files with 359 additions and 126 deletions

67
.github/actions/setup-nix/action.yml vendored Normal file
View file

@ -0,0 +1,67 @@
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,46 +4,113 @@ on:
push:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-24.04
strategy:
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:
- name: Checkout the repository
uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install nix
uses: cachix/install-nix-action@v16
- name: setup nix
uses: ./.github/actions/setup-nix
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
# TODO: add a binary cache
# - uses: cachix/cachix-action@v10
# with:
# name: YOURCACHE
# authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
# - name: Install and start Tailscale
# run: |
# # Start tailscaled daemon in background using nix shell
# nix profile add nixpkgs#tailscale
# sudo tailscaled --state=mem: &
# # 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
run: nix flake check --accept-flake-config
- name: Pre-build the system configuration
run: nix build --accept-flake-config .
- name: Build the Neovim Configuration
run: nix build --accept-flake-config . -j3
timeout-minutes: 300
continue-on-error: true
- name: Print out the size of /nix/store
run: du -sh /nix/store
- name: Get the init.lua path
if: matrix.system == 'x86_64-linux'
run: |
init_path=$(grep "init=" result/bin/nixvim-print-init | awk -F'=' '{print $2}')
cp $init_path init.lua
- name: Upload the artifact
uses: actions/upload-artifact@v4
if: matrix.system == 'x86_64-linux'
with:
name: neovim-configuration
path: init.lua
- name: Publish the init.lua to an orphan github branch
if: matrix.system == 'x86_64-linux'
run: |
git config --global user.name github-actions
git config --global user.email github-actions@github.com
@ -52,6 +119,7 @@ jobs:
git add init.lua
git commit -m "Publish init.lua"
git push --force origin init-lua
git checkout main # switch back to main branch for graceful job ending
check-formatting:
runs-on: ubuntu-24.04

View file

@ -1,6 +1,64 @@
{lib, ...}: let
definitions = lib.attrNames (lib.filterAttrs (filename: kind:
filename != "default.nix" && (kind == "regular" || kind == "directory"))
(builtins.readDir ./.));
in
lib.mkMerge (map (file: import ./${file}) definitions)
{pkgs, ...}: {
imports = [
./colorscheme.nix
./options.nix
./plugins
];
config = {
# Use <Space> as leader key
globals.mapleader = " ";
globals.maplocalleader = " ";
# Set 'vi' and 'vim' aliases to nixvim
viAlias = true;
vimAlias = true;
# Setup clipboard support
clipboard = {
# Use xsel as clipboard provider
# providers.xsel.enable = true;
# Sync system clipboard
register = "unnamedplus";
};
extraPackages = with pkgs; [
nix-inspect
nixd
git
git-lfs
cloc
ripgrep
lazygit
black
fd
ripgrep
];
keymaps = [
{
mode = "n";
key = "<leader>gg";
action = "<cmd>LazyGit<CR>";
options = {
desc = "LazyGit (root dir)";
};
}
];
extraPlugins = with pkgs.vimPlugins; [
lazygit-nvim
];
extraConfigLua = ''
require("telescope").load_extension("lazygit")
'';
performance = {
byteCompileLua = {
enable = true;
nvimRuntime = true;
configs = true;
plugins = true;
};
};
};
}

View file

@ -19,5 +19,31 @@
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
# 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 = "";
};
};
}

23
config/plugins/avante.nix Normal file
View file

@ -0,0 +1,23 @@
{
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

@ -0,0 +1,36 @@
{
plugins.blink-cmp = {
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,16 +1,9 @@
{
# settings of these plugins live in their respective files
imports = [
./blink-cmp.nix
./cmp.nix
./comment.nix
./gitsigns.nix
./lsp.nix
./mini.nix
./oil.nix
./treesitter.nix
./which-key.nix
];
{lib, ...}: {
imports =
lib.mapAttrsToList (name: _path: ./. + "/${name}")
(lib.filterAttrs (filename: kind:
filename != "default.nix" && (kind == "regular" || kind == "directory"))
(builtins.readDir ./.));
plugins = {
# todo comments highlighter
@ -53,7 +46,7 @@
mini.enable = true; # TODO look more into the mini plugin
# cursor animation
smear-cursor.enable = true;
smear-cursor.enable = false;
# add buffer tab plugin
bufferline.enable = true;
@ -72,5 +65,17 @@
# tip pop-up
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,6 +7,9 @@
view_options = {
show_hidden = true;
};
win_options = {
signcolumn = "yes:2";
};
};
# add this keymaps only if oil plugin is enabled
keymaps = lib.mkIf config.plugins.oil.enable [

View file

@ -1,6 +1,6 @@
{
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 = {
ensure_installed = [
"python"

View file

@ -1,60 +0,0 @@
{pkgs, ...}: {
imports = [./config ./plugins];
config = {
# Use <Space> as leader key
globals.mapleader = " ";
globals.maplocalleader = " ";
# Set 'vi' and 'vim' aliases to nixvim
viAlias = true;
vimAlias = true;
# Setup clipboard support
clipboard = {
# Use xsel as clipboard provider
# providers.xsel.enable = true;
# Sync system clipboard
register = "unnamedplus";
};
extraPackages = with pkgs; [
nix-inspect
nixd
git
git-lfs
cloc
ripgrep
lazygit
black
fd
ripgrep
];
keymaps = [
{
mode = "n";
key = "<leader>gg";
action = "<cmd>LazyGit<CR>";
options = {
desc = "LazyGit (root dir)";
};
}
];
extraPlugins = with pkgs.vimPlugins; [
lazygit-nvim
];
extraConfigLua = ''
require("telescope").load_extension("lazygit")
'';
performance = {
byteCompileLua = {
enable = true;
nvimRuntime = true;
configs = true;
plugins = true;
};
};
};
}

44
flake.lock generated
View file

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

View file

@ -1,6 +1,15 @@
{
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 = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# https://gerschtli.github.io/nix-formatter-pack/nix-formatter-pack-options.html
@ -41,18 +50,22 @@
mkNixvim = specialArgs:
nixvim.legacyPackages.${system}.makeNixvimWithModule {
inherit pkgs;
module = ./.;
module = ./config;
extraSpecialArgs =
specialArgs
// {
inherit pkgs self;
};
};
in {
in rec {
default = mkNixvim {};
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;
});
};
}

View file

@ -1,6 +0,0 @@
{
plugins.blink-cmp = {
settings = {
};
};
}