install nix-index-database and comma; refactoring

This commit is contained in:
cy 2025-03-01 14:09:24 -05:00
parent 44bf0ca489
commit faa35e268e
Signed by: cy
SSH key fingerprint: SHA256:o/geVWV4om1QhUSkKvDQeW/eAihwnjyXkqMwrVdbuts
6 changed files with 104 additions and 44 deletions

21
flake.lock generated
View file

@ -819,6 +819,26 @@
"type": "github"
}
},
"nix-index-database": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1740281615,
"narHash": "sha256-dZWcbAQ1sF8oVv+zjSKkPVY0ebwENQEkz5vc6muXbKY=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "465792533d03e6bb9dc849d58ab9d5e31fac9023",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-index-database",
"type": "github"
}
},
"nix-ld": {
"inputs": {
"nixpkgs": [
@ -1175,6 +1195,7 @@
"lix-module": "lix-module",
"nil": "nil",
"niri": "niri",
"nix-index-database": "nix-index-database",
"nix-ld": "nix-ld",
"nixpkgs": "nixpkgs_5",
"nixpkgs-stable": "nixpkgs-stable_4",

View file

@ -87,6 +87,10 @@
inputs.flake-utils.follows = "flake-utils";
inputs.flake-compat.follows = "flake-compat";
};
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
nvim-github-theme = {
url = "github:projekt0n/github-nvim-theme";
@ -213,6 +217,7 @@
inputs.nixvim.homeManagerModules.nixvim
inputs.niri.homeModules.config
inputs.plasma-manager.homeManagerModules.plasma-manager
inputs.nix-index-database.hmModules.nix-index
];
};

View file

@ -24,11 +24,39 @@
userSettings = {
"workbench.colorTheme" = "GitHub Dark Default";
"files.autoSave" = "onFocusChange";
"nix.enableLanguageServer" = true;
"nix.serverPath" = "nil";
"editor.fontFamily" = "IBM Plex Mono";
"editor.fontSize" = 15;
"window.zoomLevel" = 0.5;
"security.promptForLocalFileProtocolHandling" = false;
"security.promptForRemoteFileProtocolHandling" = false;
"markdown-preview-enhanced.previewTheme" = "github-dark.css";
"editor.minimap.enabled" = false;
"explorer.confirmDelete" = false;
"explorer.confirmDragAndDrop" = false;
"editor.acceptSuggestionOnEnter" = "off";
"editor.acceptSuggestionOnCommitCharacter" = false;
"workbench.startupEditor" = "none";
"git.openRepositoryInParentFolders" = "never";
# terminal stuff
"terminal.integrated.cursorBlinking" = true;
"terminal.integrated.cursorStyle" = "line";
"terminal.integrated.customGlyphs" = false;
"terminal.integrated.env.linux" = {
# https://github.com/tomrijndorp/vscode-finditfaster/issues/112#issuecomment-2475227546
FZF_DEFAULT_OPTS = "--bind ctrl-n:down,ctrl-p:up";
};
# don't let the workbench handle terminal keys like ctrl+n and friends
"terminal.integrated.sendKeybindingsToShell" = true;
"terminal.integrated.allowChords" = false;
"nix.enableLanguageServer" = true;
"nix.serverPath" = "nil";
"cSpell.enabledFileTypes" = {
"markdown" = true;
"*" = false;
};
# vim stuff
"vim.leader" = ",";
@ -39,36 +67,63 @@
"silent" = true;
}
{
"before" = [ "<leader>" "m" ];
"before" = [
"<leader>"
"m"
];
"commands" = [ "bookmarks.toggle" ];
}
{
"before" = [ "<leader>" "l" ];
"before" = [
"<leader>"
"l"
];
"commands" = [ "bookmarks.toggleLabeled" ];
}
{
"before" = [ "<leader>" "b" ];
"before" = [
"<leader>"
"b"
];
"commands" = [ "bookmarks.list" ];
}
{
"before" = [ "<leader>" "s" ];
"before" = [
"<leader>"
"s"
];
"commands" = [ "workbench.action.toggleSidebarVisibility" ];
}
{
"before" = [ "<leader>" "f" "f" ];
"before" = [
"<leader>"
"f"
"f"
];
"commands" = [ "find-it-faster.findFiles" ];
}
{
"before" = [ "<leader>" "f" "g"];
"before" = [
"<leader>"
"f"
"g"
];
"commands" = [ "find-it-faster.findWithinFiles" ];
}
{
"before" = [ "<leader>" "f" "t"];
"before" = [
"<leader>"
"f"
"t"
];
"commands" = [ "find-it-faster.findWithinFilesWithType" ];
}
# "gd" for definitions is by default
{
"before" = [ "g" "r" ];
"before" = [
"g"
"r"
];
"commands" = [ "editor.action.goToReferences" ];
}
# the default is weird when you need to go back within a file
@ -104,27 +159,6 @@
"extensions.experimental.affinity" = {
"vscodevim.vim" = 1;
};
"workbench.startupEditor" = "none";
"git.openRepositoryInParentFolders" = "never";
# terminal stuff
"terminal.integrated.cursorBlinking" = true;
"terminal.integrated.cursorStyle" = "line";
"terminal.integrated.customGlyphs" = false;
"terminal.integrated.env.linux" = {
# https://github.com/tomrijndorp/vscode-finditfaster/issues/112#issuecomment-2475227546
FZF_DEFAULT_OPTS = "--bind ctrl-n:down,ctrl-p:up";
};
# don't let the workbench handle terminal keys like ctrl+n and friends
"terminal.integrated.sendKeybindingsToShell" = true;
"terminal.integrated.allowChords" = false;
"security.promptForLocalFileProtocolHandling" = false;
"security.promptForRemoteFileProtocolHandling" = false;
"markdown-preview-enhanced.previewTheme" = "github-dark.css";
"editor.minimap.enabled" = false;
"explorer.confirmDelete" = false;
"explorer.confirmDragAndDrop" = false;
};
};
};

View file

@ -54,9 +54,12 @@
yarn
rclone
go
(rust-bin.selectLatestNightlyWith (toolchain: toolchain.default.override {
(rust-bin.selectLatestNightlyWith (
toolchain:
toolchain.default.override {
extensions = [ "rust-src" ];
}))
}
))
pwgen
lua-language-server
gnumake
@ -159,4 +162,6 @@
AWS_ACCESS_KEY_ID = "$(cat /run/secrets/aws/key_id)";
AWS_SECRET_ACCESS_KEY = "$(cat /run/secrets/aws/key_secret)";
};
programs.nix-index-database.comma.enable = true;
}

View file

@ -119,6 +119,6 @@
programs.fzf.enableZshIntegration = true;
programs.zoxide.enableZshIntegration = true;
programs.eza.enableZshIntegration = true;
programs.nix-index.enableZshIntegration = false;
programs.direnv.enableZshIntegration = false;
programs.nix-index.enableZshIntegration = true;
programs.direnv.enableZshIntegration = true;
}

View file

@ -63,11 +63,6 @@
enableNTS = true;
};
# this is true by default and mutually exclusive with
# programs.nix-index
programs.command-not-found.enable = false;
programs.nix-index.enable = false; # set above to false to use this
# see journald.conf(5)
services.journald.extraConfig = "MaxRetentionSec=2d";
}