From 29f4e8d0d44d1e13af13f161cdc80604ab43c6a6 Mon Sep 17 00:00:00 2001 From: Sergei Bulavintsev Date: Mon, 4 Dec 2023 12:27:50 +0300 Subject: [PATCH] feat(nix): bump flakes and add atuin --- fish/config.fish | 4 ++++ fish/functions/fzf_key_bindings.fish | 4 ++-- nix/darwin/home-manager.nix | 2 +- nix/flake.lock | 30 ++++++++++++++-------------- nix/shared/home-manager.nix | 15 ++++++++++++++ nix/shared/packages.nix | 1 + 6 files changed, 38 insertions(+), 18 deletions(-) create mode 100644 nix/shared/home-manager.nix diff --git a/fish/config.fish b/fish/config.fish index abf00b5..8b1c327 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -3,6 +3,10 @@ set -a PATH "$HOME/bin/" "$HOME/.local/bin" "/opt/homebrew/bin" "$HOME/./go/bin/ # Initialize FZF keybindings fzf_key_bindings +if status --is-interactive; + atuin init fish --disable-up-arrow | source +end + # Set terminal set -g TERM screen-256color diff --git a/fish/functions/fzf_key_bindings.fish b/fish/functions/fzf_key_bindings.fish index 13a73f3..72d39eb 100644 --- a/fish/functions/fzf_key_bindings.fish +++ b/fish/functions/fzf_key_bindings.fish @@ -111,12 +111,12 @@ function fzf_key_bindings end bind \ct fzf-file-widget - bind \cr fzf-history-widget + # bind \cr fzf-history-widget bind \ec fzf-cd-widget if bind -M insert > /dev/null 2>&1 bind -M insert \ct fzf-file-widget - bind -M insert \cr fzf-history-widget + # bind -M insert \cr fzf-history-widget bind -M insert \ec fzf-cd-widget end diff --git a/nix/darwin/home-manager.nix b/nix/darwin/home-manager.nix index beb8d2a..9c10276 100644 --- a/nix/darwin/home-manager.nix +++ b/nix/darwin/home-manager.nix @@ -33,7 +33,7 @@ in { home.packages = pkgs.callPackage ./packages.nix {}; home.stateVersion = "23.05"; - # programs = {} // import ../shared/home-manager.nix {inherit config pkgs lib;}; + programs = import ../shared/home-manager.nix {inherit config pkgs lib;}; }; }; } diff --git a/nix/flake.lock b/nix/flake.lock index 75e2c06..60f5797 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -47,11 +47,11 @@ ] }, "locked": { - "lastModified": 1696360011, - "narHash": "sha256-HpPv27qMuPou4acXcZ8Klm7Zt0Elv9dgDvSJaomWb9Y=", + "lastModified": 1700795494, + "narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "8b6ea26d5d2e8359d06278364f41fbc4b903b28a", + "rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d", "type": "github" }, "original": { @@ -124,11 +124,11 @@ ] }, "locked": { - "lastModified": 1697410455, - "narHash": "sha256-jCs/ffIP3tUPN7HWWuae4BB8+haAw2NI02z5BQvWMGM=", + "lastModified": 1701609479, + "narHash": "sha256-mcEnMz7XB3K57ZX16VXoEkswljSNGXdMuUu5+g8a8R8=", "owner": "nix-community", "repo": "home-manager", - "rev": "78125bc681d12364cb65524eaa887354134053d0", + "rev": "e504e8d01f950776c3a3160ba38c5957a1b89e66", "type": "github" }, "original": { @@ -141,11 +141,11 @@ "homebrew-cask": { "flake": false, "locked": { - "lastModified": 1697435558, - "narHash": "sha256-Bh53R+JKiI41SxbP4LqfHB9qE/0Lu1d1E8+AL000QrE=", + "lastModified": 1701670682, + "narHash": "sha256-GTUMnEnzi6up029RPc7LRUyzIp77IpNZZWwAXz4nFiA=", "owner": "homebrew", "repo": "homebrew-cask", - "rev": "8eb8fd717f5d2cac4c111243f01c661673a00e62", + "rev": "642f20115a8445aaefb80522fb5c4bbbe4ed6c67", "type": "github" }, "original": { @@ -157,11 +157,11 @@ "homebrew-core": { "flake": false, "locked": { - "lastModified": 1697433317, - "narHash": "sha256-4/cMTmmvjKolCsDLKYosAL4Kt2mjr+yDPaNrNpRUnGY=", + "lastModified": 1701666868, + "narHash": "sha256-dJZm86tfMu62XQjHminuJZN7CavvxOwFdSFykHui56U=", "owner": "homebrew", "repo": "homebrew-core", - "rev": "3de4907927eb07545b337143c3a6f42ad54fbf4f", + "rev": "6a27aee1dd4234265ef962d7dfc9557640151c48", "type": "github" }, "original": { @@ -240,11 +240,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1697059129, - "narHash": "sha256-9NJcFF9CEYPvHJ5ckE8kvINvI84SZZ87PvqMbH6pro0=", + "lastModified": 1701253981, + "narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5e4c2ada4fcd54b99d56d7bd62f384511a7e2593", + "rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58", "type": "github" }, "original": { diff --git a/nix/shared/home-manager.nix b/nix/shared/home-manager.nix new file mode 100644 index 0000000..b35a55c --- /dev/null +++ b/nix/shared/home-manager.nix @@ -0,0 +1,15 @@ +{ + config, + pkgs, + lib, + ... +}: let + name = "Sergei Bulavintsev"; + user = "sab"; +in { + # atuin = { + # enable = true; + # # Doesn't work for me right now, explicitly do it via fish + # enableFishIntegration = false; + # }; +} diff --git a/nix/shared/packages.nix b/nix/shared/packages.nix index 8e234be..8b1e315 100644 --- a/nix/shared/packages.nix +++ b/nix/shared/packages.nix @@ -1,6 +1,7 @@ {pkgs}: with pkgs; [ alejandra + atuin bat cmake ctags