Clean up
parent
364154d2fd
commit
20c4d88b46
70
flake.lock
70
flake.lock
|
@ -1,21 +1,5 @@
|
|||
{
|
||||
"nodes": {
|
||||
"auto-pairs-kak-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1647175978,
|
||||
"narHash": "sha256-MgqCuGj03ctKty2yQgQvy6qV/0s7euNwukhSjqauqW8=",
|
||||
"owner": "alexherbo2",
|
||||
"repo": "auto-pairs.kak",
|
||||
"rev": "bfdcb8566076f653ec707f86207f83ea75173ce9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "alexherbo2",
|
||||
"repo": "auto-pairs.kak",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"crane": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -252,22 +236,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"kakoune-sudo-write-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1629101282,
|
||||
"narHash": "sha256-O+yw8upyYnQThDoWKnFbjrjthPTCm6EaBUoJNqpUPLA=",
|
||||
"owner": "occivink",
|
||||
"repo": "kakoune-sudo-write",
|
||||
"rev": "ec0d6d26ceaadd93d6824630ba587b31e442214d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "occivink",
|
||||
"repo": "kakoune-sudo-write",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"kitty-icon": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -284,22 +252,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"luar-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1644781788,
|
||||
"narHash": "sha256-vHn/V3sfzaxaxF8OpA5jPEuPstOVwOiQrogdSGtT6X4=",
|
||||
"owner": "gustavo-hms",
|
||||
"repo": "luar",
|
||||
"rev": "2f430316f8fc4d35db6c93165e2e77dc9f3d0450",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "gustavo-hms",
|
||||
"repo": "luar",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixCargoIntegration": {
|
||||
"inputs": {
|
||||
"devshell": "devshell",
|
||||
|
@ -377,7 +329,6 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"auto-pairs-kak-src": "auto-pairs-kak-src",
|
||||
"dark-mode-notify-src": "dark-mode-notify-src",
|
||||
"darwin": "darwin",
|
||||
"flake-compat": "flake-compat",
|
||||
|
@ -385,13 +336,10 @@
|
|||
"helix": "helix",
|
||||
"home-manager": "home-manager",
|
||||
"homebrew-enabled": "homebrew-enabled",
|
||||
"kakoune-sudo-write-src": "kakoune-sudo-write-src",
|
||||
"kitty-icon": "kitty-icon",
|
||||
"luar-src": "luar-src",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-master": "nixpkgs-master",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"smarttab-kak-src": "smarttab-kak-src"
|
||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
|
@ -416,22 +364,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"smarttab-kak-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1649581983,
|
||||
"narHash": "sha256-STLZSwQPM+gTnkA+FQOF4I0ifPTjQWpEc/95JRzvIqU=",
|
||||
"owner": "andreyorst",
|
||||
"repo": "smarttab.kak",
|
||||
"rev": "86ac6599b13617ff938905ba4cdd8225d7eb6a2e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "andreyorst",
|
||||
"repo": "smarttab.kak",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1653893745,
|
||||
|
|
53
flake.nix
53
flake.nix
|
@ -16,48 +16,27 @@
|
|||
# Config "flag" for disabling homebrew
|
||||
homebrew-enabled.url = "github:boolean-option/true";
|
||||
|
||||
# Other sources
|
||||
# Flake helpers
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
flake-utils.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
flake-compat.url = "github:edolstra/flake-compat";
|
||||
flake-compat.flake = false;
|
||||
|
||||
# Extra sources
|
||||
helix.url = "github:helix-editor/helix";
|
||||
helix.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
flake-compat = {
|
||||
url = "github:edolstra/flake-compat";
|
||||
flake = false;
|
||||
};
|
||||
dark-mode-notify-src = {
|
||||
url = "github:bouk/dark-mode-notify";
|
||||
flake = false;
|
||||
};
|
||||
luar-src = {
|
||||
url = "github:gustavo-hms/luar";
|
||||
flake = false;
|
||||
};
|
||||
smarttab-kak-src = {
|
||||
url = "github:andreyorst/smarttab.kak";
|
||||
flake = false;
|
||||
};
|
||||
auto-pairs-kak-src = {
|
||||
url = "github:alexherbo2/auto-pairs.kak";
|
||||
flake = false;
|
||||
};
|
||||
kakoune-sudo-write-src = {
|
||||
url = "github:occivink/kakoune-sudo-write";
|
||||
flake = false;
|
||||
};
|
||||
kitty-icon = {
|
||||
url = "github:DinkDonk/kitty-icon";
|
||||
flake = false;
|
||||
};
|
||||
dark-mode-notify-src.url = "github:bouk/dark-mode-notify";
|
||||
dark-mode-notify-src.flake = false;
|
||||
kitty-icon.url = "github:DinkDonk/kitty-icon";
|
||||
kitty-icon.flake = false;
|
||||
};
|
||||
|
||||
outputs = { self, darwin, nixpkgs, home-manager, flake-utils, ... }@inputs:
|
||||
outputs = { self, darwin, home-manager, flake-utils, ... }@inputs:
|
||||
let
|
||||
|
||||
inherit (darwin.lib) darwinSystem;
|
||||
inherit (inputs.nixpkgs-unstable.lib)
|
||||
attrValues
|
||||
genAttrs
|
||||
makeOverridable
|
||||
optionalAttrs;
|
||||
|
||||
|
@ -67,7 +46,7 @@
|
|||
overlays = attrValues self.overlays ++ [
|
||||
(final: prev:
|
||||
import ./pkgs {
|
||||
inherit inputs genAttrs;
|
||||
inherit inputs;
|
||||
inherit (final) callPackage;
|
||||
inherit (final.stdenv) system;
|
||||
})
|
||||
|
@ -277,11 +256,6 @@
|
|||
patched = final: prev: optionalAttrs prev.stdenv.isDarwin {
|
||||
inherit (inputs) kitty-icon;
|
||||
lib = prev.lib // { homebrew-enabled = inputs.homebrew-enabled.value; };
|
||||
kakounePlugins = prev.kakounePlugins // {
|
||||
auto-pairs-kak = prev.kakounePlugins.auto-pairs-kak.overrideAttrs (attrs: {
|
||||
src = inputs.auto-pairs-kak-src;
|
||||
});
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -303,15 +277,16 @@
|
|||
# configs
|
||||
configs-starship-symbols = import ./home/configs/starship-symbols.nix;
|
||||
copyApplications = import ./home/copyApplications.nix;
|
||||
dark-mode-notify-service = import ./home/dark-mode-notify-service.nix;
|
||||
files = import ./home/files.nix;
|
||||
fish = import ./home/fish.nix;
|
||||
git = import ./home/git.nix;
|
||||
kakoune = import ./home/kakoune.nix;
|
||||
kitty = import ./home/kitty.nix;
|
||||
programs = import ./home/programs.nix;
|
||||
starship = import ./home/starship.nix;
|
||||
# modules
|
||||
programs-kakoune-extras = import ./modules/home/programs/kakoune/extras.nix;
|
||||
# TODO: migrate to helix
|
||||
# programs-kakoune-extras = import ./modules/home/programs/kakoune/extras.nix;
|
||||
programs-kitty-extras = import ./modules/home/programs/kitty/extras.nix;
|
||||
home-primary-user = { lib, ... }: {
|
||||
options.home.primaryUser =
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
{ pkgs, ... }: {
|
||||
# dark-mode-notify configuration
|
||||
# {{{
|
||||
launchd.enable = true;
|
||||
launchd.agents.dark-mode-notify = {
|
||||
enable = true;
|
||||
config = {
|
231
home/kakoune.nix
231
home/kakoune.nix
|
@ -1,231 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
colorsToKakoune = colors: with colors; {
|
||||
attribute = magenta;
|
||||
builtin = cyan;
|
||||
comment = comment;
|
||||
documentation = comment;
|
||||
enum = red;
|
||||
function = blue;
|
||||
keyword = magenta;
|
||||
meta = foreground;
|
||||
module = blue;
|
||||
operator = magenta;
|
||||
parameter = yellow;
|
||||
string = green;
|
||||
type = magenta;
|
||||
value = orange;
|
||||
variable = white;
|
||||
block = blue;
|
||||
bullet = comment;
|
||||
header = blue;
|
||||
link = cyan;
|
||||
list = foreground;
|
||||
mono = foreground;
|
||||
title = white;
|
||||
BufferPadding = [ background background ];
|
||||
Default = [ foreground background ];
|
||||
PrimarySelection = [ "default" "!${magenta}40" ];
|
||||
SecondarySelection = [ "default" "!${green}40" ];
|
||||
PrimaryCursor = [ "default" "!${blue}80" ];
|
||||
SecondaryCursor = [ "default" "!${green}80" ];
|
||||
PrimaryCursorEol = [ "default" "!${red}80" ];
|
||||
SecondaryCursorEol = [ "default" "!${orange}80" ];
|
||||
LineNumbers = comment;
|
||||
LineNumberCursor = orange;
|
||||
LineNumbersWrapped = [ background background ];
|
||||
MenuForeground = [ active_tab_foreground active_tab_background ];
|
||||
MenuBackground = [ inactive_tab_foreground inactive_tab_background ];
|
||||
MenuInfo = green;
|
||||
Information = [ inactive_tab_foreground inactive_tab_background ];
|
||||
Error = red;
|
||||
StatusLine = [ active_tab_foreground "${active_tab_background}+b" ];
|
||||
StatusLineMode = orange;
|
||||
StatusLineInfo = blue;
|
||||
StatusLineValue = foreground;
|
||||
StatusCursor = [ "default" "!${blue}80" ];
|
||||
Prompt = yellow;
|
||||
MatchingChar = [ "default" comment ];
|
||||
Whitespace = comment;
|
||||
InfoDefault = "Information";
|
||||
InfoBlock = "block";
|
||||
InfoBlockQuote = "quote";
|
||||
InfoBullet = "bullet";
|
||||
InfoHeader = "header";
|
||||
InfoLink = "link";
|
||||
InfoLinkMono = "header";
|
||||
InfoMono = "mono";
|
||||
InfoRule = "comment";
|
||||
InfoDiagnosticError = "InlayDiagnosticError";
|
||||
InfoDiagnosticHint = "InlayDiagnosticHint";
|
||||
InfoDiagnosticInformation = "InlayDiagnosticInfo";
|
||||
InfoDiagnosticWarning = "InlayDiagnosticWarning";
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
kak-lsp
|
||||
];
|
||||
programs.kakoune = {
|
||||
enable = true;
|
||||
|
||||
extras.colors.enable = true;
|
||||
extras.colors.dark = colorsToKakoune pkgs.lib.colors.tokyonight.dark;
|
||||
extras.colors.light = colorsToKakoune pkgs.lib.colors.tokyonight.light;
|
||||
|
||||
config = {
|
||||
autoReload = "yes";
|
||||
|
||||
hooks = [
|
||||
# smarttab hooks
|
||||
{
|
||||
name = "BufOpenFile";
|
||||
option = ".*";
|
||||
commands = "expandtab";
|
||||
}
|
||||
{
|
||||
name = "BufNewFile";
|
||||
option = ".*";
|
||||
commands = "expandtab";
|
||||
}
|
||||
{
|
||||
name = "WinSetOption";
|
||||
option = "filetype=(makefile)";
|
||||
commands = "noexpandtab";
|
||||
}
|
||||
{
|
||||
name = "ModuleLoaded";
|
||||
option = "smarttab";
|
||||
commands = ''
|
||||
set-option global softtabstop %opt{indentwidth}
|
||||
'';
|
||||
}
|
||||
# lsp hooks
|
||||
{
|
||||
name = "WinSetOption";
|
||||
option = "filetype=(none)";
|
||||
commands = ''
|
||||
lsp-enable-window
|
||||
lsp-auto-hover-enable
|
||||
'';
|
||||
}
|
||||
# general hooks
|
||||
{
|
||||
name = "WinSetOption";
|
||||
option = "filetype=(haskell|nix)";
|
||||
commands = ''
|
||||
set-option window indentwidth 2
|
||||
'';
|
||||
}
|
||||
{
|
||||
name = "WinCreate";
|
||||
option = ".*";
|
||||
commands = ''
|
||||
kakboard-enable
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
indentWidth = 4;
|
||||
|
||||
keyMappings = [
|
||||
{
|
||||
key = "<c-a-p>";
|
||||
effect = ": fzf-mode<ret>";
|
||||
mode = "normal";
|
||||
docstring = "Open fzf-mode with ctrl-alt-p";
|
||||
}
|
||||
{
|
||||
key = "<c-p>";
|
||||
effect = ": fzf-mode<ret>f<ret>";
|
||||
mode = "normal";
|
||||
docstring = "Open fzf-mode file dialog with ctrl-p";
|
||||
}
|
||||
{
|
||||
key = "<c-b>";
|
||||
effect = ": fzf-mode<ret>b<ret>";
|
||||
mode = "normal";
|
||||
docstring = "Open fzf-mode buffer dialog with ctrl-b";
|
||||
}
|
||||
{
|
||||
key = "v";
|
||||
effect = ": vertical-selection-down<ret>";
|
||||
mode = "user";
|
||||
docstring = "Extend vertical selection down";
|
||||
}
|
||||
{
|
||||
key = "<a-v>";
|
||||
effect = ": vertical-selection-up<ret>";
|
||||
mode = "user";
|
||||
docstring = "Extend vertical selection up";
|
||||
}
|
||||
{
|
||||
key = "V";
|
||||
effect = ": vertical-selection-up-and-down<ret>";
|
||||
mode = "user";
|
||||
docstring = "Extend vertical selection both up and down";
|
||||
}
|
||||
];
|
||||
|
||||
numberLines.enable = true;
|
||||
numberLines.highlightCursor = true;
|
||||
numberLines.relative = true;
|
||||
|
||||
scrollOff.columns = 4;
|
||||
scrollOff.lines = 2;
|
||||
|
||||
showMatching = true;
|
||||
|
||||
showWhitespace.enable = true;
|
||||
showWhitespace.space = " ";
|
||||
|
||||
ui.assistant = "cat";
|
||||
ui.enableMouse = true;
|
||||
|
||||
wrapLines.enable = true;
|
||||
wrapLines.indent = true;
|
||||
wrapLines.marker = "⏎";
|
||||
wrapLines.word = true;
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
eval %sh{${pkgs.kak-lsp}/bin/kak-lsp --kakoune -s $kak_session}
|
||||
enable-auto-pairs
|
||||
alias global w!! sudo-write
|
||||
'';
|
||||
|
||||
plugins = with pkgs.kakounePlugins; [
|
||||
active-window-kak
|
||||
auto-pairs-kak
|
||||
connect-kak
|
||||
fzf-kak
|
||||
kak-lsp
|
||||
kakboard
|
||||
kakoune-state-save
|
||||
kakoune-vertical-selection
|
||||
pkgs.smarttab-kak
|
||||
pkgs.kakoune-sudo-write
|
||||
# disabled, tabs-kak tries to load before luar for some reason
|
||||
# pkgs.luar
|
||||
# tabs-kak
|
||||
];
|
||||
};
|
||||
programs.fish.functions.set-kak-colors = {
|
||||
body = ''
|
||||
if test "$term_background" = light
|
||||
kak-light
|
||||
else
|
||||
kak-dark
|
||||
end
|
||||
'';
|
||||
onVariable = "term_background";
|
||||
};
|
||||
programs.fish.shellAliases = {
|
||||
vi = "kak";
|
||||
vim = "kak";
|
||||
nvim = "kak";
|
||||
};
|
||||
}
|
|
@ -1,3 +1,5 @@
|
|||
# TODO: migrate this to helix
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
{ callPackage, inputs, genAttrs, system }:
|
||||
let
|
||||
buildPkg = name:
|
||||
callPackage
|
||||
(./. + "/${name}.nix")
|
||||
{ "${name}-src" = inputs."${name}-src"; };
|
||||
pkgs = [
|
||||
"dark-mode-notify"
|
||||
"luar"
|
||||
"smarttab-kak"
|
||||
"kakoune-sudo-write"
|
||||
"yubiswitch"
|
||||
];
|
||||
in
|
||||
genAttrs pkgs buildPkg // {
|
||||
{ callPackage, inputs, system }:
|
||||
{
|
||||
dark-mode-notify = callPackage ./dark-mode-notify.nix { inherit (inputs) dark-mode-notify-src; };
|
||||
helix = inputs.helix.packages.${system}.default;
|
||||
}
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
{ kakouneUtils, kakoune-sudo-write-src, ... }:
|
||||
|
||||
with kakouneUtils;
|
||||
|
||||
buildKakounePlugin {
|
||||
name = "kakoune-sudo-write";
|
||||
src = kakoune-sudo-write-src;
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{ kakouneUtils, luar-src, lua, ... }:
|
||||
|
||||
with kakouneUtils;
|
||||
|
||||
buildKakounePlugin {
|
||||
name = "luar";
|
||||
src = luar-src;
|
||||
buildInputs = [ lua ];
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{ kakouneUtils, smarttab-kak-src, ... }:
|
||||
|
||||
with kakouneUtils;
|
||||
|
||||
buildKakounePlugin {
|
||||
name = "smarttab";
|
||||
src = smarttab-kak-src;
|
||||
}
|
Loading…
Reference in New Issue