diff --git a/flake.nix b/flake.nix index 710d889..148dc4a 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small"; nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11"; + nixpkgs-master.url = "github:nixos/nixpkgs"; sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/home/codium.nix b/home/codium.nix index f6c9a04..9d9b479 100644 --- a/home/codium.nix +++ b/home/codium.nix @@ -17,28 +17,109 @@ rust-lang.rust-analyzer shd101wyy.markdown-preview-enhanced fwcd.kotlin + alefragnani.bookmarks + tomrijndorp.find-it-faster ]; userSettings = { "workbench.colorTheme" = "GitHub Dark Default"; - "files.autoSave" = "afterDelay"; + "files.autoSave" = "onFocusChange"; "nix.enableLanguageServer" = true; "nix.serverPath" = "nil"; "editor.fontFamily" = "IBM Plex Mono"; - "editor.fontSize" = 16; - "editor.wordWrap" = "on"; + "editor.fontSize" = 15; + "window.zoomLevel" = 0.5; - # vim mode settings - "vim.handleKeys" = { - "" = false; # file tree toggle - }; + # vim stuff + "vim.leader" = ","; "vim.normalModeKeyBindings" = [ { "before" = [ ";" ]; "after" = [ ":" ]; "silent" = true; } + { + "before" = [ "" "m" ]; + "commands" = [ "bookmarks.toggle" ]; + } + { + "before" = [ "" "l" ]; + "commands" = [ "bookmarks.toggleLabeled" ]; + } + { + "before" = [ "" "b" ]; + "commands" = [ "bookmarks.list" ]; + } + { + "before" = [ "" "s" ]; + "commands" = [ "workbench.action.toggleSidebarVisibility" ]; + } + { + "before" = [ "" "f" "f" ]; + "commands" = [ "find-it-faster.findFiles" ]; + } + { + "before" = [ "" "f" "g"]; + "commands" = [ "find-it-faster.findWithinFiles"]; + } + { + "before" = [ "" "f" "t"]; + "commands" = [ "find-it-faster.findWithinFilesWithType"]; + } + # "gd" for definitions is by default + { + "before" = [ "g" "r" ]; + "commands" = [ "editor.action.goToReferences" ]; + } + # the default is weird when you need to go back within a file + { + "before" = [ "C-o" ]; + "commands" = [ "workbench.action.navigateBack" ]; + } + { + "before" = [ "C-i" ]; + "commands" = [ "workbench.action.navigateForward" ]; + } ]; + "vim.insertModeKeyBindings" = [ + { + "before" = [ "C-a" ]; + "commands" = [ "cursorHome" ]; + } + { + "before" = [ "C-e" ]; + "commands" = [ "cursorEnd" ]; + } + ]; + "vim.visualModeKeyBindings" = [ + { + "before" = [ ">" ]; + "commands" = [ "editor.action.indentLines" ]; + } + { + "before" = [ "<" ]; + "commands" = [ "editor.action.outdentLines" ]; + } + ]; + "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; }; }; }; diff --git a/home/yt/common.nix b/home/yt/common.nix index b7c586e..28f3457 100644 --- a/home/yt/common.nix +++ b/home/yt/common.nix @@ -66,6 +66,7 @@ }; }; programs.ripgrep.enable = true; - programs.man.generateCaches = true; + # programs.man.generateCaches = true; # slows down eval programs.fd.enable = true; + news.display = "silent"; } diff --git a/home/yt/ytnix.nix b/home/yt/ytnix.nix index d16cd5f..e9b8738 100644 --- a/home/yt/ytnix.nix +++ b/home/yt/ytnix.nix @@ -54,7 +54,9 @@ yarn rclone go - rustup + (rust-bin.selectLatestNightlyWith (toolchain: toolchain.default.override { + extensions = [ "rust-src" ]; + })) pwgen lua-language-server gnumake diff --git a/home/zsh/default.nix b/home/zsh/default.nix index 0697fbc..311def5 100644 --- a/home/zsh/default.nix +++ b/home/zsh/default.nix @@ -51,6 +51,7 @@ bindkey -M viins "^E" end-of-line bindkey -M viins "^A" beginning-of-line bindkey -M viins "^B" backward-char + bindkey -M viins "^F" forward-char # accept one word completion bindkey -M viins "^S" forward-word @@ -111,6 +112,7 @@ "grv" = "git remote --verbose"; "gs" = "git status --short"; "gss" = "git status"; + "code" = "codium"; }; }; diff --git a/hosts/ytnix/default.nix b/hosts/ytnix/default.nix index 296335c..42d9217 100644 --- a/hosts/ytnix/default.nix +++ b/hosts/ytnix/default.nix @@ -232,9 +232,9 @@ snapshotOnly = true; settings = { snapshot_preserve_min = "latest"; - target_preserve = "*d"; - target_preserve_min = "no"; - target = "/mnt/external/btr_backup/ytnix"; + target_preserve = "30d"; + target_preserve_min = "2d"; + target = "/mnt/target/btr_backup/ytnix"; stream_compress = "zstd"; stream_compress_level = "8"; snapshot_dir = "/snapshots"; diff --git a/overlay/default.nix b/overlay/default.nix index 6a824d1..8a998e9 100644 --- a/overlay/default.nix +++ b/overlay/default.nix @@ -17,6 +17,7 @@ importedOverlays { conduwuit = inputs.conduwuit.packages.x86_64-linux.static-x86_64-linux-musl-all-features-x86_64-haswell-optimised; + ungoogled-chromium = pkgFrom inputs.nixpkgs-master "ungoogled-chromium"; } ) ]