kakoune config

This commit is contained in:
Charlie Root 2024-07-16 11:13:12 +02:00
commit a920b04973
16 changed files with 174 additions and 156 deletions

101
flake.lock generated
View file

@ -439,10 +439,46 @@
"type": "github"
}
},
"flake-parts_10": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_4"
},
"locked": {
"lastModified": 1698882062,
"narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "8c9fa2545007b49a5db5f650ae91f227672c3877",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1719994518,
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
"lastModified": 1715865404,
"narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=",
@ -457,7 +493,7 @@
"type": "github"
}
},
"flake-parts_3": {
"flake-parts_4": {
"inputs": {
"nixpkgs-lib": [
"neovim-nightly-overlay",
@ -478,7 +514,7 @@
"type": "github"
}
},
"flake-parts_4": {
"flake-parts_5": {
"inputs": {
"nixpkgs-lib": [
"neovim-nightly-overlay",
@ -499,7 +535,7 @@
"type": "indirect"
}
},
"flake-parts_5": {
"flake-parts_6": {
"inputs": {
"nixpkgs-lib": [
"nixpak",
@ -520,7 +556,7 @@
"type": "github"
}
},
"flake-parts_6": {
"flake-parts_7": {
"inputs": {
"nixpkgs-lib": [
"nixpkgs-wayland",
@ -542,7 +578,7 @@
"type": "github"
}
},
"flake-parts_7": {
"flake-parts_8": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
@ -563,7 +599,7 @@
"type": "github"
}
},
"flake-parts_8": {
"flake-parts_9": {
"inputs": {
"nixpkgs-lib": [
"schizofox",
@ -584,24 +620,6 @@
"type": "github"
}
},
"flake-parts_9": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_3"
},
"locked": {
"lastModified": 1698882062,
"narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "8c9fa2545007b49a5db5f650ae91f227672c3877",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems_3"
@ -873,7 +891,7 @@
},
"hercules-ci-effects": {
"inputs": {
"flake-parts": "flake-parts_4",
"flake-parts": "flake-parts_5",
"nixpkgs": [
"neovim-nightly-overlay",
"nixpkgs"
@ -1216,7 +1234,7 @@
"lib-aggregate": {
"inputs": {
"flake-utils": "flake-utils_5",
"nixpkgs-lib": "nixpkgs-lib_2"
"nixpkgs-lib": "nixpkgs-lib_3"
},
"locked": {
"lastModified": 1719749459,
@ -1291,7 +1309,7 @@
},
"neovim-flake": {
"inputs": {
"flake-parts": "flake-parts_2",
"flake-parts": "flake-parts_3",
"flake-utils": "flake-utils_3",
"nil": "nil",
"nixpkgs": [
@ -1417,7 +1435,7 @@
"neovim-nightly-overlay": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts_3",
"flake-parts": "flake-parts_4",
"git-hooks": "git-hooks",
"hercules-ci-effects": "hercules-ci-effects",
"neovim-src": "neovim-src",
@ -1502,7 +1520,7 @@
},
"nix-eval-jobs": {
"inputs": {
"flake-parts": "flake-parts_6",
"flake-parts": "flake-parts_7",
"nix-github-actions": "nix-github-actions",
"nixpkgs": "nixpkgs_9",
"treefmt-nix": "treefmt-nix"
@ -1576,7 +1594,7 @@
},
"nixpak": {
"inputs": {
"flake-parts": "flake-parts_5",
"flake-parts": "flake-parts_6",
"hercules-ci-effects": "hercules-ci-effects_2",
"nixpkgs": [
"nixpkgs"
@ -1613,6 +1631,18 @@
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1719876945,
"narHash": "sha256-Fm2rDDs86sHy0/1jxTOKB1118Q0O3Uc7EC0iXvXKpbI=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz"
}
},
"nixpkgs-lib_2": {
"locked": {
"lastModified": 1714640452,
"narHash": "sha256-QBx10+k6JWz6u7VsohfSw8g8hjdBZEf8CFzXH1/1Z94=",
@ -1624,7 +1654,7 @@
"url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz"
}
},
"nixpkgs-lib_2": {
"nixpkgs-lib_3": {
"locked": {
"lastModified": 1719708727,
"narHash": "sha256-XFNKtyirrGNdehpg7lMNm1skEcBApjqGhaHc/OI95HY=",
@ -1639,7 +1669,7 @@
"type": "github"
}
},
"nixpkgs-lib_3": {
"nixpkgs-lib_4": {
"locked": {
"dir": "lib",
"lastModified": 1698611440,
@ -1874,7 +1904,7 @@
"inputs": {
"devshell": "devshell",
"flake-compat": "flake-compat_5",
"flake-parts": "flake-parts_7",
"flake-parts": "flake-parts_8",
"git-hooks": "git-hooks_2",
"home-manager": "home-manager_3",
"nix-darwin": "nix-darwin",
@ -3530,6 +3560,7 @@
"doom-emacs-config": "doom-emacs-config",
"doomemacs": "doomemacs",
"emacs-overlay": "emacs-overlay",
"flake-parts": "flake-parts_2",
"home-manager": "home-manager_2",
"hyprland": "hyprland",
"hyprland-plugins": "hyprland-plugins",
@ -3578,7 +3609,7 @@
"schizofox": {
"inputs": {
"flake-compat": "flake-compat_7",
"flake-parts": "flake-parts_8",
"flake-parts": "flake-parts_9",
"home-manager": "home-manager_4",
"nixpak": [
"nixpak"
@ -3606,7 +3637,7 @@
"searx-randomizer": {
"inputs": {
"crane": "crane",
"flake-parts": "flake-parts_9",
"flake-parts": "flake-parts_10",
"nixpkgs": [
"schizofox",
"nixpkgs"

View file

@ -1,10 +1,13 @@
{
description = "My NixOS config flake";
outputs = inputs @ {nixpkgs, ...}: {
inherit (nixpkgs) lib;
outputs = inputs: {
inherit (inputs.nixpkgs) lib;
nixosConfigurations = import ./hosts {inherit inputs;};
};
inputs = {
# what am I doing to this config help
flake-parts.url = "github:hercules-ci/flake-parts";
# Unstable nixpkgs baby!
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# nixpkgs for wayland

View file

@ -88,7 +88,7 @@
editors = {
emacs = {
enable = false;
doom.enable = false;
doom.enable = true;
};
helix.enable = true;
kakoune.enable = true;

View file

@ -7,6 +7,5 @@ _: {
../../../options/common/docs.nix
../../../options/common/gpu/nvidia.nix
../../../options/desktop/monitors.nix
../../../overlay.nix
];
}

View file

@ -1,16 +0,0 @@
# Taken from: https://github.com/hlissner/dotfiles/blob/master/lib/options.nix
{lib, ...}: let
inherit (lib) mkOption types;
in {
mkOpt = type: default: mkOption {inherit type default;};
mkOpt' = type: default: description:
mkOption {inherit type default description;};
mkBoolOpt = default:
mkOption {
inherit default;
type = types.bool;
example = true;
};
}

View file

@ -1,27 +0,0 @@
let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11";
pkgs = import nixpkgs {
config = {};
overlays = [];
};
in
pkgs.mkShellNoCC {
packages = with pkgs; [
m4
bison
ncurses
gcc
clang
gnat
zlib
flex
pkg-config
curl
zlib
coreboot-toolchain.x64
];
GREETING = "You're now in the coreboot build shell!;";
shellHook = ''cd /home/vali/repos/coreboot && echo $GREETING'';
}

View file

@ -8,7 +8,7 @@
}:
with lib; let
cfg = config.modules.editors.emacs;
username = config.modules.other.system.username;
inherit (config.modules.other.system) username;
repoUrl = inputs.doomemacs;
configRepoUrl = inputs.doom-emacs-config;
emacs-desktop-symbol = pkgs.makeDesktopItem {
@ -24,18 +24,17 @@ in {
config = mkIf cfg.enable {
## Emacs itself as an overlay
nixpkgs.overlays = [inputs.emacs-overlay.overlay];
#nixpkgs.overlays = [inputs.emacs-overlay.overlay];
services.emacs = {
enable = true;
package = pkgs.emacs29-pgtk;
};
environment.systemPackages = with pkgs; [
binutils # native-comp needs 'as', provided by this
# 28.2 + native-comp
((emacsPackagesFor emacsNativeComp).emacsWithPackages
(epkgs: [epkgs.vterm]))
emacs-desktop-symbol
## Doom dependencies
git
(ripgrep.override {withPCRE2 = true;})
ripgrep
gnutls # for TLS connectivity
## Optional dependencies
@ -45,20 +44,17 @@ in {
## Module dependencies
# :checkers spell
(aspellWithDicts (ds: with ds; [en en-computers en-science]))
(aspellWithDicts (ds: with ds; [en en-computers en-science de]))
# :tools editorconfig
editorconfig-core-c # per-project style config
# :tools lookup & :lang org +roam
sqlite
# :lang latex & :lang org (latex previews)
texlive.combined.scheme-medium
# :lang beancount
beancount
];
home-manager.users.${username}.home.sessionPath = ["/home/vali/.config/emacs/bin"];
# modules.shell.zsh.rcFiles = [ "${configDir}/emacs/aliases.zsh" ];
environment.variables.PATH = ["/home/vali/.config/emacs/bin"];
fonts.fonts = [pkgs.emacs-all-the-icons-fonts];

View file

@ -1 +1,50 @@
_: {imports = [./kakoune.nix];}
{
config,
lib,
pkgs,
}: let
inherit (config.modules.other.system) username;
cfg = config.modules.editors.kakoune;
inherit (lib) mkIf mkEnableOption;
in {
options.modules.editors.kakoune.enable = mkEnableOption "kakoune";
config.home-manager.users.${username}.programs.kakoune = mkIf cfg.enable {
enable = true;
config = {
autoComplete = true;
autoReload = true;
indentWidth = 4;
tabStop = 4;
incrementalSearch = false;
numberLines = {
enable = true;
relative = true;
highlightCursor = true;
separator = "|";
};
scrollOff = {
lines = 4;
columns = 4;
};
ui = {
enableMouse = true;
assistant = "none";
statusLine = "bottom";
wrapLines = {
enable = true;
indent = true;
word = true;
};
};
plugins = with pkgs.kakounePlugins; [
auto-pairs-kak
fzf-kak
powerline-kak
byline-kak
kakoune-lsp
];
};
};
}

View file

@ -12,7 +12,7 @@ local options = {
backspace = { 'indent', 'eol', 'start' }, -- backspace through everything in insert mode
hidden = true, -- Enable background buffers
history = 100, -- Remember N lines in history
lazyredraw = false, -- Faster scrolling if enabled, breaks noice
lazyredraw = true, -- Faster scrolling if enabled, breaks noice
synmaxcol = 240, -- Max column for syntax highlight
updatetime = 250, -- ms to wait for trigger an event

View file

@ -7,7 +7,7 @@ if vim.g.neovide then
vim.g.neovide_transparency = 0.80
vim.g.neovide_show_border = true
vim.g.neovide_input_macos_alt_is_meta = true
vim.g.neovide_cursor_animate_command_line = false -- noice incompat
vim.g.neovide_cursor_animate_command_line = true -- noice incompat
vim.g.neovide_cursor_smooth_blink = true
vim.g.neovide_cursor_vfx_mode = 'ripple'

View file

@ -1,4 +1,4 @@
local noice = require('noice')
--local noice = require('noice')
local no_top_text = {
opts = {
border = {
@ -6,7 +6,7 @@ local no_top_text = {
},
},
}
--[[
-- luacheck: ignore
noice.setup({
cmdline = {
@ -18,7 +18,6 @@ noice.setup({
search_up = no_top_text,
},
},
lsp = {
override = {
['cmp.entry.get_documentation'] = true,
@ -70,3 +69,4 @@ noice.setup({
},
},
})
--]]

View file

@ -7,7 +7,7 @@
in {
programs.neovim-flake.settings.vim = {
ui = {
noice.enable = true;
noice.enable = false;
colorizer.enable = true;
modes-nvim.enable = true;
illuminate.enable = true;

View file

@ -6,7 +6,7 @@
inputs,
...
}: let
inherit (builtins) filter map toString path isPath throw;
inherit (builtins) filter map toString path;
inherit (lib.filesystem) listFilesRecursive;
inherit (lib.strings) hasSuffix fileContents;
inherit (lib.attrsets) genAttrs;
@ -64,17 +64,19 @@ in {
};
additionalRuntimePaths = [
(mkRuntimeDir "after")
(mkRuntimeDir "spell")
#(mkRuntimeDir "after")
#(mkRuntimeDir "spell")
./runtime/spell
./runtime/after
];
# while I should be doing this in luaConfigRC below
# I have come to realise that spellfile contents are
# actually **not** loaded when luaConfigRC is used.
# as spellfile is a vim thing, this should be fine
configRC.spellfile = entryAnywhere ''
set spellfile=${toString ./spell/runtime/en.utf-8.add} " toString sanitizes the path
'';
# configRC.spellfile = entryAnywhere ''
# set spellfile=${toString ./runtime/spell/en.utf-8.add} " toString sanitizes the path
# '';
# additional lua configuration that I can append
# or, to be more precise, randomly inject into

View file

@ -1,19 +0,0 @@
{
inputs,
outputs,
...
}: let
add_nur = self: super: {
# nur-no-pkgs = import inputs.nur-no-pkgs { pkgs = inputs.nixpkgs.legacyPackages.${profile-config.system}; nurpkgs = inputs.nixpkgs.legacyPackages.${profile-config.system}; };
nur = import inputs.nur {
pkgs = import inputs.nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;
}; # .legacyPackages.${profile-config.system};
nurpkgs = import inputs.nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;
}; # .legacyPackages.${profile-config.system};
};
};
in {nixpkgs.overlays = [add_nur];}

0
parts/lib/builders.nix Normal file
View file