[del] Remove ZSH and Add some nvim plugins
This commit is contained in:
@@ -3,13 +3,14 @@ let
|
||||
start-tmux = (import ../scripts/start-tmux.nix) pkgs;
|
||||
# https://mipmip.github.io/home-manager-option-search/
|
||||
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;
|
||||
[
|
||||
@@ -21,7 +22,7 @@ in {
|
||||
jq
|
||||
tldr
|
||||
spotify-player
|
||||
htop-vim
|
||||
bottom
|
||||
qmk
|
||||
nodejs
|
||||
nix-index
|
||||
@@ -144,17 +145,19 @@ 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.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "starship";
|
||||
rev = "main"; # Replace with the latest commit hash
|
||||
sha256 = "sha256-nsRuxQFKbQkyEI4TXgvAjcroVdG+heKX5Pauq/4Ota0";
|
||||
} + /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.fetchFromGitHub
|
||||
{
|
||||
owner = "catppuccin";
|
||||
repo = "starship";
|
||||
rev = "main"; # Replace with the latest commit hash
|
||||
sha256 = "sha256-nsRuxQFKbQkyEI4TXgvAjcroVdG+heKX5Pauq/4Ota0";
|
||||
} + /palettes/${flavour}.toml));
|
||||
};
|
||||
eza = {
|
||||
enable = true;
|
||||
@@ -182,19 +185,28 @@ in {
|
||||
enable = true;
|
||||
config = { theme = "catppuccin"; };
|
||||
themes = {
|
||||
catppuccin = let flavor = "mocha";
|
||||
in {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "bat";
|
||||
rev = "main";
|
||||
sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw";
|
||||
catppuccin =
|
||||
let flavor = "mocha";
|
||||
in {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "bat";
|
||||
rev = "main";
|
||||
sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw";
|
||||
};
|
||||
file = "Catppuccin-${flavor}.tmTheme";
|
||||
};
|
||||
file = "Catppuccin-${flavor}.tmTheme";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
rbw = {
|
||||
enable = true;
|
||||
settings = {
|
||||
email = "uttarayan21@gmail.com";
|
||||
base_url = "https://pass.uttarayan.me";
|
||||
pinenttry = if device.isMac then pkgs.pinentry_mac else pkgs.pinentry-qt;
|
||||
};
|
||||
};
|
||||
# Let Home Manager install and manage itself.
|
||||
home-manager = { enable = true; };
|
||||
};
|
||||
@@ -204,10 +216,11 @@ 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";
|
||||
|
||||
|
||||
@@ -21,43 +21,49 @@
|
||||
undofile = true;
|
||||
};
|
||||
|
||||
globals = { mapleader = " "; };
|
||||
globals = {
|
||||
mapleader = " ";
|
||||
};
|
||||
plugins = {
|
||||
lspconfig = {
|
||||
enable = true;
|
||||
servers = {
|
||||
nil = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
settings = {
|
||||
['nil'] = {
|
||||
formatting = {
|
||||
command = { "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt" },
|
||||
},
|
||||
nix = {
|
||||
flake = {
|
||||
autoArchive = true,
|
||||
extraConfig =
|
||||
/* lua */
|
||||
''
|
||||
settings = {
|
||||
['nil'] = {
|
||||
formatting = {
|
||||
command = { "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt" },
|
||||
},
|
||||
nix = {
|
||||
flake = {
|
||||
autoArchive = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
'';
|
||||
'';
|
||||
};
|
||||
lua-language-server.enable = true;
|
||||
jsonls.enable = true;
|
||||
html.enable = true;
|
||||
# rust-analyzer.enable = true;
|
||||
};
|
||||
extraLua.pre = ''
|
||||
local lsp_zero = require'lsp-zero'
|
||||
local lspconfig = require 'lspconfig'
|
||||
lsp_zero.on_attach(function(client, bufnr)
|
||||
lsp_zero.default_keymaps({buffer = bufnr})
|
||||
if client.server_capabilities.inlayHintProvider then
|
||||
vim.lsp.inlay_hint.enable(bufnr, true)
|
||||
end
|
||||
end)
|
||||
'';
|
||||
extraLua.pre =
|
||||
/* lua */
|
||||
''
|
||||
local lsp_zero = require'lsp-zero'
|
||||
local lspconfig = require 'lspconfig'
|
||||
lsp_zero.on_attach(function(client, bufnr)
|
||||
lsp_zero.default_keymaps({buffer = bufnr})
|
||||
if client.server_capabilities.inlayHintProvider then
|
||||
vim.lsp.inlay_hint.enable(bufnr, true)
|
||||
end
|
||||
end)
|
||||
'';
|
||||
# extraLua.post = ''
|
||||
# vim.lsp.inlay_hint.enable(bufnr, true)
|
||||
# '';
|
||||
@@ -65,16 +71,32 @@
|
||||
|
||||
nvim-dap.enable = true;
|
||||
todo-comments.enable = true;
|
||||
lualine.enable = true;
|
||||
lualine = {
|
||||
enable = true;
|
||||
};
|
||||
commentary.enable = true;
|
||||
surround.enable = true;
|
||||
which-key.enable = true;
|
||||
ufo.enable = true;
|
||||
fugitive.enable = true;
|
||||
markdown-preview = {
|
||||
enable = true;
|
||||
autoStart = true;
|
||||
};
|
||||
ts-context-commentstring.enable = true;
|
||||
|
||||
treesitter = {
|
||||
enable = true;
|
||||
indent = true;
|
||||
folding = true;
|
||||
refactor = {
|
||||
smartRename = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
smartRename = "<leader>rn";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
mini = {
|
||||
@@ -148,6 +170,7 @@
|
||||
noice-nvim
|
||||
nvim-web-devicons
|
||||
|
||||
|
||||
];
|
||||
extraConfigLua = builtins.readFile ./extraConfig.lua;
|
||||
package = pkgs.neovim-nightly;
|
||||
|
||||
@@ -133,3 +133,4 @@ require("noice").setup({
|
||||
lsp_doc_border = true, -- add a border to hover docs and signature help
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ let
|
||||
tmux popup -d '#{pane_current_path}' -xC -yC -w$width -h$height -E "tmux attach -t scratch || tmux new -s scratch"
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
in
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
shell = "${pkgs.nushellFull}/bin/nu";
|
||||
@@ -26,42 +27,48 @@ in {
|
||||
}
|
||||
{
|
||||
plugin = tmuxPlugins.catppuccin;
|
||||
extraConfig = ''
|
||||
set -g @catppuccin_flavour 'mocha'
|
||||
set -g @catppuccin_window_default_text ''''''
|
||||
'';
|
||||
extraConfig =
|
||||
/* tmux */
|
||||
''
|
||||
set -g @catppuccin_flavour 'mocha'
|
||||
set -g @catppuccin_window_default_text ''''''
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = tmuxPlugins.battery;
|
||||
extraConfig = ''
|
||||
set -g @catppuccin_status_modules_right "battery application session date_time"
|
||||
'';
|
||||
extraConfig =
|
||||
/* tmux */
|
||||
''
|
||||
set -g @catppuccin_status_modules_right "battery application session date_time"
|
||||
'';
|
||||
}
|
||||
];
|
||||
extraConfig = ''
|
||||
set -gw mode-keys vi
|
||||
set -g status-keys vi
|
||||
set -g allow-passthrough on
|
||||
set -ga update-environment TERM
|
||||
set -ga update-environment TERM_PROGRAM
|
||||
set-option -sg escape-time 10
|
||||
set-option -sa terminal-features ',xterm-256color:RGB'
|
||||
extraConfig =
|
||||
/* tmux */
|
||||
''
|
||||
set -gw mode-keys vi
|
||||
set -g status-keys vi
|
||||
set -g allow-passthrough on
|
||||
set -ga update-environment TERM
|
||||
set -ga update-environment TERM_PROGRAM
|
||||
set -sg escape-time 10
|
||||
set -sa terminal-features ',wezterm:RGB'
|
||||
|
||||
|
||||
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
bind-key -n C-\\ run-shell ${scratchpad}
|
||||
bind-key -n C-\\ run-shell ${scratchpad}
|
||||
|
||||
bind C-n next-window
|
||||
bind C-p previous-window
|
||||
bind C-q last-window
|
||||
bind C-n next-window
|
||||
bind C-p previous-window
|
||||
bind C-q last-window
|
||||
|
||||
if-shell 'uname | grep -q "Darwin"' { set -s copy-command "pbcopy" }
|
||||
if-shell 'uname | grep -q "Linux"' { set -s copy-command "wl-copy" }
|
||||
'';
|
||||
if-shell 'uname | grep -q "Darwin"' { set -s copy-command "pbcopy" }
|
||||
if-shell 'uname | grep -q "Linux"' { set -s copy-command "wl-copy" }
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,64 +1,32 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
local wezterm = require 'wezterm';
|
||||
return {
|
||||
-- -- font = wezterm.font("Hasklug Nerd Font Mono", { weight = "Regular", stretch = "Normal", style = "Normal" }),
|
||||
-- font = wezterm.font_with_fallback({
|
||||
-- "Hasklig",
|
||||
-- "Symbols Nerd Font Mono"
|
||||
-- }),
|
||||
|
||||
color_scheme = "Catppuccin Mocha",
|
||||
font_size = 16,
|
||||
-- colors = {
|
||||
-- -- The default text color
|
||||
-- foreground = "#f8f8f2",
|
||||
-- -- The default background color
|
||||
-- -- background = "#282a36",
|
||||
-- -- Overrides the cell background color when the current cell is occupied by the
|
||||
-- -- cursor and the cursor style is set to Block
|
||||
-- cursor_bg = "#f8f8f2",
|
||||
-- -- Overrides the text color when the current cell is occupied by the cursor
|
||||
-- cursor_fg = "#000",
|
||||
-- -- Specifies the border color of the cursor when the cursor style is set to Block,
|
||||
-- -- or the color of the vertical or horizontal bar when the cursor style is set to
|
||||
-- -- Bar or Underline.
|
||||
-- cursor_border = "#52ad70",
|
||||
-- -- the foreground color of selected text
|
||||
-- selection_fg = "#ffffff",
|
||||
-- -- the background color of selected text
|
||||
-- selection_bg = "#ffffff",
|
||||
-- -- The color of the scrollbar "thumb"; the portion that represents the current viewport
|
||||
-- scrollbar_thumb = "#222222",
|
||||
-- -- The color of the split lines between panes
|
||||
-- split = "#444444",
|
||||
-- ansi = { "#21222c", "#ff5555", "#50fa7b", "#f1fa8c", "#bd93f9", "#ff79c6", "#8be9fd", "#f8f8f2" },
|
||||
-- brights = { "#6272a4", "#ff6e6e", "#69ff94", "#ffffa5", "#d6acff", "#ff92df", "#a4ffff", "#ffffff" },
|
||||
-- -- Arbitrary colors of the palette in the range from 16 to 255
|
||||
-- indexed = { [136] = "#af8700" },
|
||||
-- -- Since: nightly builds only
|
||||
-- -- When the IME, a dead key or a leader key are being processed and are effectively
|
||||
-- -- holding input pending the result of input composition, change the cursor
|
||||
-- -- to this color to give a visual cue about the compose state.
|
||||
-- compose_cursor = "orange",
|
||||
-- },
|
||||
initial_cols = 120,
|
||||
hide_tab_bar_if_only_one_tab = true,
|
||||
window_background_opacity = 0.8,
|
||||
cursor_blink_rate = 8,
|
||||
default_cursor_style = "BlinkingBlock",
|
||||
default_prog = { "${pkgs.fish.outPath}/bin/fish", "-l" },
|
||||
window_padding = {
|
||||
left = 2,
|
||||
right = 0,
|
||||
top = 2,
|
||||
bottom = 0,
|
||||
},
|
||||
window_decorations = "RESIZE",
|
||||
use_ime = false,
|
||||
}
|
||||
'';
|
||||
extraConfig = /* lua */
|
||||
''
|
||||
local wezterm = require 'wezterm';
|
||||
return {
|
||||
term = "wezterm",
|
||||
font = wezterm.font_with_fallback({
|
||||
"Hasklig",
|
||||
"Symbols Nerd Font Mono"
|
||||
}),
|
||||
color_scheme = "Catppuccin Mocha",
|
||||
font_size = 16,
|
||||
initial_cols = 120,
|
||||
hide_tab_bar_if_only_one_tab = true,
|
||||
window_background_opacity = 0.8,
|
||||
cursor_blink_rate = 8,
|
||||
default_cursor_style = "BlinkingBlock",
|
||||
default_prog = { "${pkgs.fish.outPath}/bin/fish", "-l" },
|
||||
window_padding = {
|
||||
left = 2,
|
||||
right = 0,
|
||||
top = 2,
|
||||
bottom = 0,
|
||||
},
|
||||
window_decorations = "RESIZE",
|
||||
use_ime = false,
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -15,7 +15,22 @@
|
||||
package = pkgs.nix;
|
||||
};
|
||||
|
||||
security.pam.enableSudoTouchIdAuth = true;
|
||||
# security.pam.enableSudoTouchIdAuth = true;
|
||||
system.patches = [
|
||||
(pkgs.writeText "pam-reattach.patch"
|
||||
/* diff */
|
||||
''
|
||||
new file mode 100644
|
||||
index 0000000..e4293c0
|
||||
--- /dev/null
|
||||
+++ b/etc/pam.d/sudo_local
|
||||
@@ -0,0 +1,3 @@
|
||||
+# sudo_local: local config file which survives system update and is included for sudo
|
||||
+# uncomment following line to enable Touch ID for sudo
|
||||
+auth optional ${pkgs.pam-reattach}/lib/pam/pam_reattach.so
|
||||
'')
|
||||
|
||||
];
|
||||
|
||||
programs.bash.enable = true;
|
||||
programs.zsh.enable = true;
|
||||
@@ -40,87 +55,3 @@
|
||||
}
|
||||
];
|
||||
}
|
||||
# {
|
||||
# description = "Example Darwin system flake";
|
||||
# inputs = {
|
||||
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
# # home-manager.url = "github:nix-community/home-manager/master";
|
||||
# # home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
# nix-darwin.url = "github:LnL7/nix-darwin";
|
||||
# nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
# };
|
||||
# outputs = inputs @ {
|
||||
# self,
|
||||
# nix-darwin,
|
||||
# nixpkgs,
|
||||
# }: let
|
||||
# configuration = {pkgs, ...}: {
|
||||
# # List packages installed in system profile. To search by name, run:
|
||||
# # $ nix-env -qaP | grep wget
|
||||
# environment.systemPackages = with pkgs; [
|
||||
# neovim
|
||||
# bat
|
||||
# ripgrep
|
||||
# fd
|
||||
# fish
|
||||
# nushellFull
|
||||
# tmux
|
||||
# wezterm
|
||||
# # yabai
|
||||
# nerdfonts
|
||||
# ];
|
||||
# # Auto upgrade nix package and the daemon service.
|
||||
# services.nix-daemon.enable = true;
|
||||
# # nix.package = pkgs.nix;
|
||||
# # Necessary for using flakes on this system.
|
||||
# nix = {
|
||||
# settings = {
|
||||
# experimental-features = "nix-command flakes repl-flake";
|
||||
# max-jobs = 8;
|
||||
# };
|
||||
# extraOptions = ''
|
||||
# build-users-group = nixbld
|
||||
# extra-nix-path = nixpkgs=flake:nixpkgs
|
||||
# '';
|
||||
# # keep-outputs = true
|
||||
# # keep-derivations = true
|
||||
# };
|
||||
# # Create /etc/zshrc that loads the nix-darwin environment.
|
||||
# # programs.zsh.enable = true; # default shell on catalina
|
||||
# # programs.fish.enable = true;
|
||||
# # Set Git commit hash for darwin-version.
|
||||
# system.configurationRevision = self.rev or self.dirtyRev or null;
|
||||
# system.keyboard.enableKeyMapping = true;
|
||||
# system.keyboard.remapCapsLockToControl = true;
|
||||
# system.keyboard.swapLeftCommandAndLeftAlt = true;
|
||||
# system.keyboard.userKeyMapping = {
|
||||
# # Right Command to Option
|
||||
# HIDKeyboardModifierMappingSrc = 30064771303;
|
||||
# HIDKeyboardModifierMappingDst = 30064771302;
|
||||
# # Right Option to command
|
||||
# HIDKeyboardModifierMappingSrc = 30064771302;
|
||||
# HIDKeyboardModifierMappingDst = 30064771303;
|
||||
# };
|
||||
# fonts.fonts = [(pkgs.nerdfonts.override {fonts = ["Hasklig" "Hack"];})];
|
||||
# system.defaults.finder.AppleShowAllExtensions = true;
|
||||
# system.defaults.dock.autohide = true;
|
||||
# # Used for backwards compatibility, please read the changelog before changing.
|
||||
# # $ darwin-rebuild changelog
|
||||
# system.stateVersion = 4;
|
||||
# # The platform the configuration will be used on.
|
||||
# nixpkgs.hostPlatform = "aarch64-darwin";
|
||||
# nix.package = pkgs.nix;
|
||||
# };
|
||||
# in {
|
||||
# # Build darwin flake using:
|
||||
# # $ darwin-rebuild build --flake .#simple
|
||||
# darwinConfigurations.Uttarayans-MacBook-Pro = nix-darwin.lib.darwinSystem {
|
||||
# # system = "aarch64-darwin";
|
||||
# pkgs = import nixpkgs {system = "aarch64-darwin";};
|
||||
# modules = [configuration];
|
||||
# };
|
||||
# # Expose the package set, including overlays, for convenience.
|
||||
# # darwinPackages = self.darwinConfigurations.Uttarayans-MacBook-Pro.pkgs;
|
||||
# };
|
||||
# }
|
||||
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
{ ... }: {
|
||||
{ pkgs, ... }: {
|
||||
services = {
|
||||
skhd = {
|
||||
enable = true;
|
||||
skhdConfig = ''
|
||||
# open terminal, blazingly fast compared to iTerm/Hyper
|
||||
# alt - return : /Applications/kitty.app/Contents/MacOS/kitty --single-instance -d ~
|
||||
alt - return : /Applications/WezTerm.app/Contents/MacOS/wezterm
|
||||
alt - return : ${pkgs.wezterm}/bin/wezterm-gui
|
||||
shift + alt - return: pkill mpv
|
||||
# alt + \ : pkill mpv
|
||||
|
||||
# open qutebrowser
|
||||
# alt + shift - return : ~/Scripts/qtb.sh
|
||||
|
||||
# open mpv
|
||||
alt - m : open -na /Applications/mpv.app $(pbpaste)
|
||||
|
||||
Reference in New Issue
Block a user