Trying out chezmoi
This commit is contained in:
20
.config/home-manager/home-bat.nix
Normal file
20
.config/home-manager/home-bat.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
pkgs:
|
||||
{
|
||||
enable = true;
|
||||
extraPackages = with pkgs.bat-extras; [ batdiff batman batgrep batwatch ];
|
||||
config = {
|
||||
style = "numbers";
|
||||
theme = "catppuccin-frappe";
|
||||
};
|
||||
themes = {
|
||||
catppuccin-frappe = {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "sublime-text"; # Bat uses sublime syntax for its themes
|
||||
rev = "3d8625d937d89869476e94bc100192aa220ce44a";
|
||||
sha256 = "3ABUsfJpb6RO6AiuuSL5gwDofJIwC5tlEMzBrlY9/s0=";
|
||||
};
|
||||
file = "Frappe.tmTheme";
|
||||
};
|
||||
};
|
||||
}
|
||||
6
.config/home-manager/home-exa.nix
Normal file
6
.config/home-manager/home-exa.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
icons = true;
|
||||
}
|
||||
127
.config/home-manager/home-fish.nix
Normal file
127
.config/home-manager/home-fish.nix
Normal file
@@ -0,0 +1,127 @@
|
||||
pkgs:
|
||||
{
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
du = "dust";
|
||||
http = "xh";
|
||||
https = "xh";
|
||||
mux = "tmuxinator";
|
||||
nsh = "nix-shell --command fish";
|
||||
};
|
||||
|
||||
# interactiveShellInit = ''
|
||||
# function fish_prompt
|
||||
# set -l last_status $status
|
||||
# if not set -q __fish_git_prompt_show_informative_status
|
||||
# set -g __fish_git_prompt_show_informative_status 1
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_hide_untrackedfiles
|
||||
# set -g __fish_git_prompt_hide_untrackedfiles 1
|
||||
# end
|
||||
#
|
||||
# if not set -q __fish_git_prompt_color_branch
|
||||
# set -g __fish_git_prompt_color_branch magenta --bold
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_showupstream
|
||||
# set -g __fish_git_prompt_showupstream "informative"
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_char_upstream_ahead
|
||||
# set -g __fish_git_prompt_char_upstream_ahead "↑"
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_char_upstream_behind
|
||||
# set -g __fish_git_prompt_char_upstream_behind "↓"
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_char_upstream_prefix
|
||||
# set -g __fish_git_prompt_char_upstream_prefix ""
|
||||
# end
|
||||
#
|
||||
# if not set -q __fish_git_prompt_char_stagedstate
|
||||
# set -g __fish_git_prompt_char_stagedstate "●"
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_char_dirtystate
|
||||
# set -g __fish_git_prompt_char_dirtystate "✚"
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_char_untrackedfiles
|
||||
# set -g __fish_git_prompt_char_untrackedfiles "…"
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_char_invalidstate
|
||||
# set -g __fish_git_prompt_char_invalidstate "✖"
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_char_cleanstate
|
||||
# set -g __fish_git_prompt_char_cleanstate "✔"
|
||||
# end
|
||||
#
|
||||
# if not set -q __fish_git_prompt_color_dirtystate
|
||||
# set -g __fish_git_prompt_color_dirtystate blue
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_color_stagedstate
|
||||
# set -g __fish_git_prompt_color_stagedstate yellow
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_color_invalidstate
|
||||
# set -g __fish_git_prompt_color_invalidstate red
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_color_untrackedfiles
|
||||
# set -g __fish_git_prompt_color_untrackedfiles $fish_color_normal
|
||||
# end
|
||||
# if not set -q __fish_git_prompt_color_cleanstate
|
||||
# set -g __fish_git_prompt_color_cleanstate green --bold
|
||||
# end
|
||||
#
|
||||
# if not set -q __fish_prompt_normal
|
||||
# set -g __fish_prompt_normal (set_color normal)
|
||||
# end
|
||||
#
|
||||
# set -l color_cwd
|
||||
# set -l prefix
|
||||
# set -l suffix
|
||||
# switch "$USER"
|
||||
# case root toor
|
||||
# if set -q fish_color_cwd_root
|
||||
# set color_cwd $fish_color_cwd_root
|
||||
# else
|
||||
# set color_cwd $fish_color_cwd
|
||||
# end
|
||||
# set suffix '#'
|
||||
# case '*'
|
||||
# set color_cwd $fish_color_cwd
|
||||
# set suffix '$'
|
||||
# end
|
||||
#
|
||||
# # PWD
|
||||
# set_color $color_cwd
|
||||
# echo -n (prompt_pwd)
|
||||
# set_color normal
|
||||
#
|
||||
# printf '%s ' (fish_git_prompt)
|
||||
#
|
||||
# if not test $last_status -eq 0
|
||||
# set_color $fish_color_error
|
||||
# echo -n "[$last_status] "
|
||||
# set_color normal
|
||||
# end
|
||||
#
|
||||
# echo -n "$suffix "
|
||||
# end
|
||||
# '';
|
||||
plugins = [
|
||||
{
|
||||
name = "nix-env";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "lilyball";
|
||||
repo = "nix-env.fish";
|
||||
rev = "7b65bd228429e852c8fdfa07601159130a818cfa";
|
||||
sha256 = "RG/0rfhgq6aEKNZ0XwIqOaZ6K5S4+/Y5EEMnIdtfPhk=";
|
||||
};
|
||||
}
|
||||
# {
|
||||
# name = "fzf";
|
||||
# src = pkgs.fetchFromGitHub {
|
||||
# owner = "PatrickF1";
|
||||
# repo = "fzf.fish";
|
||||
# rev = "63c8f8e65761295da51029c5b6c9e601571837a1";
|
||||
# sha256 = "036n50zr9kyg6ad408zn7wq2vpfwhmnfwab465km4dk60ywmrlcb";
|
||||
|
||||
# };
|
||||
# }
|
||||
];
|
||||
}
|
||||
8
.config/home-manager/home-fzf.nix
Normal file
8
.config/home-manager/home-fzf.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
enable = true;
|
||||
defaultCommand = "fd --type f";
|
||||
fileWidgetCommand = "fd --type f";
|
||||
fileWidgetOptions = ["--preview" "'bat --color=always --style=numbers --line-range=:500 {}'"];
|
||||
changeDirWidgetCommand = "fd --type d";
|
||||
tmux.enableShellIntegration = true;
|
||||
}
|
||||
3
.config/home-manager/home-k9s.nix
Normal file
3
.config/home-manager/home-k9s.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
pkgs: {
|
||||
enable = true;
|
||||
}
|
||||
62
.config/home-manager/home-neovim.nix
Normal file
62
.config/home-manager/home-neovim.nix
Normal file
@@ -0,0 +1,62 @@
|
||||
pkgs:
|
||||
{
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
extraConfig = ''
|
||||
set et
|
||||
set nofixeol
|
||||
set number
|
||||
set ts=2
|
||||
set sts=-1
|
||||
set sw=2
|
||||
'';
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
vim-gitgutter
|
||||
{
|
||||
plugin = nvim-lspconfig;
|
||||
type = "lua";
|
||||
config = ''
|
||||
-- Mappings.
|
||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||
local opts = { noremap=true, silent=true }
|
||||
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
|
||||
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
|
||||
|
||||
-- Use an on_attach function to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
local on_attach = function(client, bufnr)
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
|
||||
-- Mappings.
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
local bufopts = { noremap=true, silent=true, buffer=bufnr }
|
||||
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
|
||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
|
||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
|
||||
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
|
||||
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, bufopts)
|
||||
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
|
||||
vim.keymap.set('n', '<space>wl', function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end, bufopts)
|
||||
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
|
||||
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
|
||||
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts)
|
||||
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
|
||||
vim.keymap.set('n', '<space>f', vim.lsp.buf.formatting, bufopts)
|
||||
end
|
||||
|
||||
require('lspconfig')['hls'].setup{
|
||||
on_attach = on_attach,
|
||||
}
|
||||
require('lspconfig')['rust_analyzer'].setup{
|
||||
on_attach = on_attach,
|
||||
}
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
||||
29
.config/home-manager/home-starship.nix
Normal file
29
.config/home-manager/home-starship.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
pkgs: {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
git_branch.symbol = " ";
|
||||
git_status.ahead = "⇡\${count}";
|
||||
git_status.behind = "⇣\${count}";
|
||||
git_status.diverged = "⇕⇡\${ahead_count}⇣\${behind_count}";
|
||||
git_status.format = "([\\[\$conflicted\$staged\$ahead_behind\\]](\$style) )";
|
||||
java.symbol = " ";
|
||||
line_break.disabled = true;
|
||||
nix_shell.symbol = " ";
|
||||
nodejs.symbol = " ";
|
||||
package.disabled = true;
|
||||
palette = "catppuccin_frappe";
|
||||
python.symbol = " ";
|
||||
package.symbol = " ";
|
||||
rust.symbol = " ";
|
||||
docker_context.disabled = true;
|
||||
shell.disabled = false;
|
||||
} // builtins.fromTOML (builtins.readFile
|
||||
(pkgs.fetchFromGitHub
|
||||
{
|
||||
owner = "catppuccin";
|
||||
repo = "starship";
|
||||
rev = "3e3e54410c3189053f4da7a7043261361a1ed1bc"; # Replace with the latest commit hash
|
||||
sha256 = "soEBVlq3ULeiZFAdQYMRFuswIIhI9bclIU8WXjxd7oY=";
|
||||
} + /palettes/frappe.toml));
|
||||
}
|
||||
35
.config/home-manager/home-tmux.nix
Normal file
35
.config/home-manager/home-tmux.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
pkgs: {
|
||||
baseIndex = 1;
|
||||
clock24 = true;
|
||||
customPaneNavigationAndResize = true;
|
||||
historyLimit = 50000;
|
||||
enable = true;
|
||||
escapeTime = 0;
|
||||
keyMode = "vi";
|
||||
mouse = true;
|
||||
plugins = [
|
||||
{
|
||||
plugin = pkgs.tmuxPlugins.catppuccin;
|
||||
extraConfig = ''set -g @catppuccin_window_tabs_enabled on
|
||||
set -g @catppuccin_window_default_text "#W"
|
||||
set -g @catppuccin_window_current_text "#W"'';
|
||||
}
|
||||
# {
|
||||
# plugin = pkgs.tmuxPlugins.tmux-thumbs;
|
||||
# extraConfig = ''
|
||||
# set -g @thumbs-unique enabled
|
||||
# '';
|
||||
# }
|
||||
];
|
||||
shell = pkgs.zsh + "/bin/zsh";
|
||||
shortcut = "Space";
|
||||
tmuxinator.enable = true;
|
||||
terminal = "xterm-256color";
|
||||
extraConfig = ''
|
||||
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
||||
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
|
||||
|
||||
bind-key -T launcher g popup -h 100% -w 100% -E lazygit
|
||||
bind-key g switch-client -Tlauncher
|
||||
'';
|
||||
}
|
||||
23
.config/home-manager/home-zsh.nix
Normal file
23
.config/home-manager/home-zsh.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
pkgs: {
|
||||
enable = true;
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
};
|
||||
syntaxHighlighting.enable = true;
|
||||
enableAutosuggestions = true;
|
||||
historySubstringSearch.enable = true;
|
||||
history.share = false;
|
||||
cdpath = ["~/source"];
|
||||
plugins = [
|
||||
{
|
||||
name = "zsh-nix-shell";
|
||||
file = "nix-shell.plugin.zsh";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "chisui";
|
||||
repo = "zsh-nix-shell";
|
||||
rev = "v0.7.0";
|
||||
sha256 = "149zh2rm59blr2q458a5irkfh82y3dwdich60s9670kl3cl5h2m1";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
139
.config/home-manager/home.nix
Normal file
139
.config/home-manager/home.nix
Normal file
@@ -0,0 +1,139 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the
|
||||
# paths it should manage.
|
||||
home.username = "jfrikker";
|
||||
home.homeDirectory = "/Users/jfrikker";
|
||||
|
||||
# home.sessionVariables.BAT_THEME = "catppuccin-frappe";
|
||||
# home.sessionVariables.RUST_SRC_PATH = "${pkgs.rust-bin.stable."1.68.0".rust-src}/lib/rustlib/src/rust/library";
|
||||
|
||||
# home.shellAliases = {
|
||||
# jdtls = "jdt-language-server";
|
||||
# };
|
||||
|
||||
home.sessionPath=[
|
||||
"$HOME/.cargo/bin"
|
||||
];
|
||||
|
||||
xdg.enable = true;
|
||||
# xdg.configFile."k9s/skin.yml" = {
|
||||
# enable = true;
|
||||
# source = pkgs.fetchFromGitHub {
|
||||
# owner = "catppuccin";
|
||||
# repo = "k9s";
|
||||
# rev = "322598e19a4270298b08dc2765f74795e23a1615"; # Replace with the latest commit hash
|
||||
# sha256 = "GrRCOwCgM8BFhY8TzO3/WDTUnGtqkhvlDWE//ox2GxI=";
|
||||
# } + /dist/frappe.yml;
|
||||
# };
|
||||
|
||||
xdg.configFile."lazygit/config.yml" = {
|
||||
enable = true;
|
||||
source = pkgs.fetchFromGitHub
|
||||
{
|
||||
owner = "catppuccin";
|
||||
repo = "lazygit";
|
||||
rev = "b2ecb6d41b6f54a82104879573c538e8bdaeb0bf"; # Replace with the latest commit hash
|
||||
sha256 = "9BBmWRcjNaJE9T0RKVEJaSnkrbMom0CLYE8PzAT6yFw=";
|
||||
} + /themes/frappe.yml;
|
||||
};
|
||||
|
||||
# xdg.configFile."fish/themes/Catppuccin Frappe.theme" = {
|
||||
# enable = true;
|
||||
# source = pkgs.fetchFromGitHub {
|
||||
# owner = "catppuccin";
|
||||
# repo = "fish";
|
||||
# rev = "91e6d6721362be05a5c62e235ed8517d90c567c9";
|
||||
# sha256 = "l9V7YMfJWhKDL65dNbxaddhaM6GJ0CFZ6z+4R6MJwBA=";
|
||||
# } + "/themes/Catppuccin Frappe.theme";
|
||||
# };
|
||||
|
||||
home.packages = [
|
||||
# pkgs.apacheKafka
|
||||
# pkgs.aria
|
||||
pkgs.aws-iam-authenticator
|
||||
pkgs.awscli
|
||||
pkgs.bashInteractive
|
||||
pkgs.du-dust
|
||||
pkgs.emacs29
|
||||
pkgs.fd
|
||||
pkgs.fend
|
||||
pkgs.gcc
|
||||
pkgs.gh
|
||||
# pkgs.ghc
|
||||
# pkgs.go
|
||||
# pkgs.haskellPackages.cabal-install
|
||||
# pkgs.haskellPackages.haskell-language-server
|
||||
# pkgs.helix
|
||||
# pkgs.httpie
|
||||
# pkgs.inconsolata-nerdfont
|
||||
# pkgs.jdt-language-server
|
||||
pkgs.just
|
||||
# pkgs.jsonnet
|
||||
pkgs.kubectl
|
||||
pkgs.lorri
|
||||
# pkgs.maven
|
||||
# pkgs.mysql-client
|
||||
# pkgs.neovide
|
||||
pkgs.neovim
|
||||
# pkgs.nodejs-16_x
|
||||
# pkgs.nodePackages.typescript-language-server
|
||||
# pkgs.postgresql
|
||||
# (pkgs.python3.withPackages (p: [p.ipython p.pyyaml p.boto3]))
|
||||
pkgs.ripgrep
|
||||
pkgs.rlwrap
|
||||
# pkgs.rust-analyzer
|
||||
# pkgs.rust-script
|
||||
# pkgs.rust-bin.stable."1.68.0".default
|
||||
# pkgs.rust-bin.stable."1.68.0".rust-analyzer
|
||||
# pkgs.rustup
|
||||
pkgs.sbcl
|
||||
# pkgs.source-code-pro
|
||||
# pkgs.stack
|
||||
pkgs.tokei
|
||||
pkgs.xh
|
||||
# pkgs.xonsh
|
||||
# pkgs.yarn
|
||||
# pkgs.zellij
|
||||
];
|
||||
|
||||
# This value determines the Home Manager release that your
|
||||
# configuration is compatible with. This helps avoid breakage
|
||||
# when a new Home Manager release introduces backwards
|
||||
# incompatible changes.
|
||||
#
|
||||
# You can update Home Manager without changing this value. See
|
||||
# the Home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
home.stateVersion = "22.05";
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
|
||||
programs.bash.enable = true;
|
||||
programs.bat = import ./home-bat.nix pkgs;
|
||||
# programs.btop.enable = true;
|
||||
programs.direnv.enable = true;
|
||||
programs.eza = import ./home-exa.nix;
|
||||
# programs.fish = import ./home-fish.nix pkgs;
|
||||
programs.fzf = import ./home-fzf.nix;
|
||||
# programs.gh.enable = true;
|
||||
programs.git.enable = true;
|
||||
programs.git.delta.enable = true;
|
||||
programs.helix.enable = true;
|
||||
programs.helix.defaultEditor = true;
|
||||
# programs.ion.enable = true;
|
||||
# programs.java.enable = true;
|
||||
# programs.java.package = pkgs.jdk17;
|
||||
programs.jq.enable = true;
|
||||
# programs.k9s.enable = true;
|
||||
programs.lazygit.enable = true;
|
||||
programs.starship = import ./home-starship.nix pkgs;
|
||||
programs.tmux = import ./home-tmux.nix pkgs;
|
||||
# programs.zoxide.enable = true;
|
||||
programs.zsh = import ./home-zsh.nix pkgs;
|
||||
|
||||
# programs.neovim = import ./home-neovim.nix pkgs;
|
||||
}
|
||||
Reference in New Issue
Block a user