[feat] Add neovide and floating terminal

This commit is contained in:
uttarayan21
2024-03-07 05:24:32 +05:30
parent e74e5baff2
commit 0f0be7d903
5 changed files with 56 additions and 29 deletions

View File

@@ -39,7 +39,6 @@
Value = true;
Status = "default";
};
# "browser.compactmode.show" = { Value = true; Status = "default"; };
"browser.urlbar.suggest.calculator" = {
Value = true;
Status = "default";

View File

@@ -3,16 +3,18 @@ let
# https://mipmip.github.io/home-manager-option-search/
start-tmux = (import ../scripts/start-tmux.nix) pkgs;
lazy = false;
in {
in
{
imports = [
# Include the results of the hardware scan.
./tmux.nix
./wezterm.nix
] ++ (if device.isLinux then [ ../linux ] else [ ])
++ (if !lazy then [ ./nvim ] else [ ]);
++ (if !lazy then [ ./nvim ] else [ ]);
home.packages = with pkgs;
[
neovide
sqls
vcpkg
# vcpkg-tool
@@ -35,7 +37,6 @@ in {
fd
nixfmt
dust
eza
cachix
rustup
cmake
@@ -118,19 +119,19 @@ in {
shellAbbrs = {
vim = "nvim";
vi = "nvim";
nv = "nvim";
nv = "neovide";
g = "git";
yy = "yazi";
cd = "z";
ls = "exa";
ls = "eza";
t = "${start-tmux}";
};
shellAliases = {
g = "git";
};
shellInit = ''
set fish_greeting
yes | fish_config theme save "Catppuccin Mocha"
'';
interactiveShellInit = ''
${pkgs.spotify-player}/bin/spotify_player generate fish | source
@@ -160,17 +161,18 @@ in {
enable = true;
enableFishIntegration = true;
enableNushellIntegration = true;
settings = let flavour = "mocha"; # Replace with your preferred palette
in {
# Other config here
format = "$all"; # Remove this line to disable the default prompt format
palette = "catppuccin_${flavour}";
} // builtins.fromTOML (builtins.readFile
(pkgs.catppuccinThemes.starship + /palettes/${flavour}.toml));
settings =
let flavour = "mocha"; # Replace with your preferred palette
in {
# Other config here
format = "$all"; # Remove this line to disable the default prompt format
palette = "catppuccin_${flavour}";
} // builtins.fromTOML (builtins.readFile
(pkgs.catppuccinThemes.starship + /palettes/${flavour}.toml));
};
eza = {
enable = true;
enableAliases = true;
# enableAliases = true;
git = true;
icons = true;
};
@@ -219,22 +221,20 @@ in {
# Home Manager needs a bit of information about you and the paths it should
# manage.
username = device.user;
homeDirectory = if device.isMac then
lib.mkForce "/Users/${device.user}"
else
lib.mkForce "/home/${device.user}";
homeDirectory =
if device.isMac then
lib.mkForce "/Users/${device.user}"
else
lib.mkForce "/home/${device.user}";
stateVersion = "23.11";
file = {
".config/tmux/sessions".source = ../../tmux/sessions;
".config/macchina".source = ../../macchina;
# catppuccin themes for fish
".config/fish/themes".source = pkgs.catppuccinThemes.fish + "/themes";
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
} // (if lazy then {
".config/nvim/lua".source = ../../nvim/lua;
".config/nvim/init.lua".source = ../../nvim/init.lua;

View File

@@ -105,8 +105,8 @@
mini = {
enable = true;
ai.enable = true;
pairs.enable = true;
cursorword.enable = true;
# pairs.enable = true;
# cursorword.enable = true;
starter.enable = true;
};
@@ -138,6 +138,10 @@
"<leader>p" = "[[<cmd>bprev<cr>]]";
"<C-l>" = "[[<cmd>Outline<cr>]]";
"<C-\\\\>" = "require('FTerm').toggle";
};
terminal = {
"<C-\\\\>" = "require('FTerm').toggle";
};
};
@@ -179,6 +183,9 @@
noice-nvim
nvim-web-devicons
# Utils
FTerm-nvim
];
extraConfigLua = builtins.readFile ./extraConfig.lua;
package = pkgs.neovim-nightly;

View File

@@ -133,3 +133,13 @@ require("noice").setup({
lsp_doc_border = true, -- add a border to hover docs and signature help
},
})
require 'FTerm'.setup({
border = 'double',
dimensions = {
height = 0.9,
width = 0.9,
},
cmd = "fish",
blend = 10,
})

View File

@@ -1,7 +1,12 @@
{ pkgs, ... }:
let
mkCatppuccin = { owner ? "catppuccin", version ? "0.0.1", item, rev ? "main"
, sha256 ? pkgs.lib.fakeSha256 }:
mkCatppuccin =
{ owner ? "catppuccin"
, version ? "0.0.1"
, item
, rev ? "main"
, sha256 ? pkgs.lib.fakeSha256
}:
pkgs.stdenv.mkDerivation {
inherit version;
pname = item;
@@ -15,7 +20,8 @@ let
cp -r ./* $out/
'';
};
in {
in
{
bat = mkCatppuccin {
item = "bat";
@@ -31,4 +37,9 @@ in {
item = "starship";
sha256 = "sha256-nsRuxQFKbQkyEI4TXgvAjcroVdG+heKX5Pauq/4Ota0";
};
fish = mkCatppuccin {
item = "fish";
sha256 = "sha256-Dc/zdxfzAUM5NX8PxzfljRbYvO9f9syuLO8yBr+R3qg";
};
}