diff --git a/flake.lock b/flake.lock index 7fd9b1e..e23b7b6 100644 --- a/flake.lock +++ b/flake.lock @@ -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", diff --git a/flake.nix b/flake.nix index 710d889..e1a6338 100644 --- a/flake.nix +++ b/flake.nix @@ -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 ]; }; diff --git a/home/codium.nix b/home/codium.nix index 792f880..1844269 100644 --- a/home/codium.nix +++ b/home/codium.nix @@ -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" = [ "" "m" ]; + "before" = [ + "" + "m" + ]; "commands" = [ "bookmarks.toggle" ]; } { - "before" = [ "" "l" ]; + "before" = [ + "" + "l" + ]; "commands" = [ "bookmarks.toggleLabeled" ]; } { - "before" = [ "" "b" ]; + "before" = [ + "" + "b" + ]; "commands" = [ "bookmarks.list" ]; } { - "before" = [ "" "s" ]; + "before" = [ + "" + "s" + ]; "commands" = [ "workbench.action.toggleSidebarVisibility" ]; } { - "before" = [ "" "f" "f" ]; + "before" = [ + "" + "f" + "f" + ]; "commands" = [ "find-it-faster.findFiles" ]; } { - "before" = [ "" "f" "g"]; - "commands" = [ "find-it-faster.findWithinFiles"]; + "before" = [ + "" + "f" + "g" + ]; + "commands" = [ "find-it-faster.findWithinFiles" ]; } { - "before" = [ "" "f" "t"]; - "commands" = [ "find-it-faster.findWithinFilesWithType"]; + "before" = [ + "" + "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 @@ -84,7 +139,7 @@ "vim.insertModeKeyBindings" = [ { "before" = [ "C-a" ]; - "commands" = [ "cursorHome" ]; + "commands" = [ "cursorHome" ]; } { "before" = [ "C-e" ]; @@ -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; }; }; }; diff --git a/home/yt/ytnix.nix b/home/yt/ytnix.nix index e9b8738..9ac7635 100644 --- a/home/yt/ytnix.nix +++ b/home/yt/ytnix.nix @@ -54,9 +54,12 @@ yarn rclone go - (rust-bin.selectLatestNightlyWith (toolchain: toolchain.default.override { - extensions = [ "rust-src" ]; - })) + (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; } diff --git a/home/zsh/default.nix b/home/zsh/default.nix index 311def5..29a7ef9 100644 --- a/home/zsh/default.nix +++ b/home/zsh/default.nix @@ -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; } diff --git a/hosts/common.nix b/hosts/common.nix index e59c314..96317b8 100644 --- a/hosts/common.nix +++ b/hosts/common.nix @@ -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"; }