Skip to content

Commit

Permalink
chore(misc): Update configs (#310)
Browse files Browse the repository at this point in the history
* chore(vim): Configure autosave

* chore(vim): Configure folding

* chore(cli): Install dua

* flake.lock: Update

Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/9786661d57c476021c8a0c3e53bf9fa2b4f3328b?narHash=sha256-EW4oXMfnfA5sNM9Jqm%2By98horWVvN66Gu7YIcEpFYZc%3D' (2025-01-20)
  → 'github:nix-community/home-manager/4481a16d1ac5bff4a77c608cefe08c9b9efe840d?narHash=sha256-rk/cmrvq3In0TegW9qaAxw%2B5YpJhRWt2p74/6JStrw0%3D' (2025-01-21)
• Updated input 'neovim-nightly':
    'github:nix-community/neovim-nightly-overlay/010ed547044c6926f746898d8876137515dd934e?narHash=sha256-JhW46GBB1Nz2Dm1dn6ZX/fKYy8JDQUOUDLqabbQB06M%3D' (2025-01-20)
  → 'github:nix-community/neovim-nightly-overlay/ac8238031094d5242da26947bfc7174369c12e33?narHash=sha256-RDwsCYHgjFf6iTi5JSfpOAnuQenDh8VFKU01XluVWM8%3D' (2025-01-21)
• Updated input 'neovim-nightly/neovim-src':
    'github:neovim/neovim/5f527f24f0ea89e9071e065530cbed449507df5c?narHash=sha256-0L6YAx41Yn0dzEJ/rWk1Th1EF8MSLEdNDMyEi0SMVCg%3D' (2025-01-19)
  → 'github:neovim/neovim/855a2a75e6f7d08376c221a46e0179e5c76176ec?narHash=sha256-A1ITJgtOOwhSC5wB/jfBV9ZuAftroeYRYFqA%2BaFKgac%3D' (2025-01-20)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/5df43628fdf08d642be8ba5b3625a6c70731c19c?narHash=sha256-Tbk1MZbtV2s5aG%2BiM99U8FqwxU/YNArMcWAv6clcsBc%3D' (2025-01-16)
  → 'github:nixos/nixpkgs/9e4d5190a9482a1fb9d18adf0bdb83c6e506eaab?narHash=sha256-nmKOgAU48S41dTPIXAq0AHZSehWUn6ZPrUKijHAMmIk%3D' (2025-01-21)
• Updated input 'nur':
    'github:nix-community/NUR/bc0cdc7e9a3103acafaf74482774487b203c05d9?narHash=sha256-YvstCm/kxwjqPbAUJNGeWy%2BwIiiOinYL5ZIKBmvvGNw%3D' (2025-01-20)
  → 'github:nix-community/NUR/12b99d964292665ae893d208de483c810fdc938a?narHash=sha256-WxGH8tw42muGji2Q7plhBjDeZ9lp6jANWL5uQhxvsYE%3D' (2025-01-22)
• Updated input 'nur/nixpkgs':
    'github:nixos/nixpkgs/5df43628fdf08d642be8ba5b3625a6c70731c19c?narHash=sha256-Tbk1MZbtV2s5aG%2BiM99U8FqwxU/YNArMcWAv6clcsBc%3D' (2025-01-16)
  → 'github:nixos/nixpkgs/9e4d5190a9482a1fb9d18adf0bdb83c6e506eaab?narHash=sha256-nmKOgAU48S41dTPIXAq0AHZSehWUn6ZPrUKijHAMmIk%3D' (2025-01-21)
• Updated input 'pre-commit-hooks':
    'github:cachix/git-hooks.nix/15a87cedeb67e3dbc8d2f7b9831990dffcf4e69f?narHash=sha256-2UNmLCKORvdBRhPGI8Vx0b6l7M8/QBey/nHLIxOl4jE%3D' (2025-01-19)
  → 'github:cachix/git-hooks.nix/9364dc02281ce2d37a1f55b6e51f7c0f65a75f17?narHash=sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg%3D' (2025-01-21)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/4c4fb93f18b9072c6fa1986221f9a3d7bf1fe4b6?narHash=sha256-GXUE9%2BFgxoZU8v0p6ilBJ8NH7k8nKmZjp/7dmMrCv3o%3D' (2025-01-17)
  → 'github:Mic92/sops-nix/015d461c16678fc02a2f405eb453abb509d4e1d4?narHash=sha256-j9IdflJwRtqo9WpM0OfAZml47eBblUHGNQTe62OUqTw%3D' (2025-01-20)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/d1ed3b385f8130e392870cfb1dbfaff8a63a1899?narHash=sha256-uPNWcYbhY2fjY3HOfRCR5jsfzdzemhfxLSxwjXYXqNc%3D' (2025-01-17)
  → 'github:numtide/treefmt-nix/f2cc121df15418d028a59c9737d38e3a90fbaf8f?narHash=sha256-5An1wq5U8sNycOBBg3nsDDgpwBmR9liOpDGlhliA6Xo%3D' (2025-01-21)
• Updated input 'wofi-tools':
    'github:szaffarano/wofi-power-menu/0250efc5a24371fb8fc14f1a5e56c1bea4da4c47?narHash=sha256-UDDDtI6wnx64KG%2B1/S6bYTc1xi1vOFuZOmRCLK2Yzew%3D' (2025-01-15)
  → 'github:szaffarano/wofi-power-menu/02a418a21d451f71cda2933645e5b723ee8496b6?narHash=sha256-k/DOe4hheRz8FauwPEGO7cakVveJQ55VqcZf6KTqafU%3D' (2025-01-21)
• Updated input 'zig':
    'github:mitchellh/zig-overlay/f473ca6b02a3ebb904350f466f1a2ec934d9def6?narHash=sha256-Yiy6HRItq/bd3vYn/BjpSnG8lVN6tlDCIoCsC2AqKWU%3D' (2025-01-20)
  → 'github:mitchellh/zig-overlay/11ba4193561b6096b2c72174163940a50251a99c?narHash=sha256-xEQ%2B2zoihSR8TSHH5KMceReUd9Ae2tPNLFoQviGpaAg%3D' (2025-01-21)

* chore(overlays): Remove ollama overlay

* Simplify tmux config
  • Loading branch information
szaffarano authored Jan 22, 2025
1 parent b60fbea commit ac9dc62
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 99 deletions.
66 changes: 33 additions & 33 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 0 additions & 18 deletions modules/home-manager/terminal/cli/tmux/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ in
};
programs.tmux = {
enable = true;

baseIndex = 1;
clock24 = true;
escapeTime = 1;
Expand Down Expand Up @@ -92,23 +91,6 @@ in
set-window-option -g window-status-bell-style "fg=#${base00},bg=#${base08}"
set-window-option -g window-status-activity-style "fg=#${base05},bg=#${base01}"
set-option -g message-command-style "fg=#${base06},bg=#${base02}"
if-shell '[ "$TINTED_TMUX_OPTION_ACTIVE" = "1" ] || [ "$BASE16_TMUX_OPTION_ACTIVE" = "1" ]' {
set-window-option -g window-active-style "fg=#${base05},bg=#${base00}"
set-window-option -g window-style "fg=#${base05},bg=#${base01}"
}
if-shell '[ "$TINTED_TMUX_OPTION_STATUSBAR" = "1" ] || [ "$BASE16_TMUX_OPTION_STATUSBAR" = "1" ]' {
set-option -g status "on"
set-option -g status-justify "left"
set-option -g status-left "#[fg=#${base05},bg=#${base03}] #S #[fg=#${base03},bg=#${base01},nobold,noitalics,nounderscore]"
set-option -g status-left-length "80"
set-option -g status-left-style none
set-option -g status-right "#[fg=#${base02},bg=#${base01} nobold, nounderscore, noitalics]#[fg=#${base04},bg=#${base02}] %Y-%m-%d  %H:%M #[fg=#${base05},bg=#${base02},nobold,noitalics,nounderscore]#[fg=#${base01},bg=#${base05}] #h "
set-option -g status-right-length "80"
set-option -g status-right-style none
set-window-option -g window-status-current-format "#[fg=#${base01},bg=#${base0A},nobold,noitalics,nounderscore]#[fg=#${base02},bg=#${base0A}] #I #[fg=#${base02},bg=#${base0A},bold] #W#{?window_zoomed_flag,*Z,} #[fg=#${base0A},bg=#${base01},nobold,noitalics,nounderscore]"
set-window-option -g window-status-format "#[fg=#${base01},bg=#${base02},noitalics]#[fg=#${base06},bg=#${base02}] #I #[fg=#${base06},bg=#${base02}] #W #[fg=#${base02},bg=#${base01},noitalics]"
set-window-option -g window-status-separator ""
}
'';
};
};
Expand Down
1 change: 1 addition & 0 deletions modules/home-manager/terminal/cli/tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ in
btop
czkawka # duplicate files finder
du-dust
dua # Disk Usage Analyzer
duf # Disk Usage/Free Utility - a better 'df' alternative
file
gawk
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,8 @@
return {
'okuuva/auto-save.nvim',
event = { 'FocusLost' },
opts = {
write_all_buffers = true,
debounce_delay = 500,
debounce_delay = 3000,
noautocmd = true,
trigger_events = {
immediate_save = { 'FocusLost' },
defer_save = {},
cancel_deferred_save = {},
},
},
config = {
group = vim.api.nvim_create_augroup('autosave', {}),

vim.api.nvim_create_autocmd('User', {
pattern = 'AutoSaveWritePost',
group = group,

callback = function(opts)
if opts.data.saved_buffer ~= nil then
local filename = vim.api.nvim_buf_get_name(opts.data.saved_buffer)
local max_levels = 3
filename = table.concat(vim.split(filename, '/'), '/', math.max(#vim.split(filename, '/') - max_levels + 1, 1))
vim.notify('AutoSave: saved ' .. filename .. ' at ' .. vim.fn.strftime '%H:%M:%S', vim.log.levels.INFO)
end
end,
}),
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ local handler = function(virtText, lnum, endLnum, width, truncate)
table.insert(newVirtText, { suffix, 'MoreMsg' })
return newVirtText
end

local ftMap = {
yaml = { 'treesitter', 'indent' },
}
return {
'kevinhwang91/nvim-ufo',
dependencies = 'kevinhwang91/promise-async',
Expand All @@ -51,8 +53,8 @@ return {
'comment',
},
},
provider_selector = function()
return { 'lsp', 'indent' }
provider_selector = function(bufnr, filetype, buftype)
return ftMap[filetype] or { 'lsp', 'indent' }
end,
}
end,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,20 @@ vim.api.nvim_create_autocmd('FileType', {
})
end,
})

-- Autosave
local group = vim.api.nvim_create_augroup('autosave', {})

vim.api.nvim_create_autocmd('User', {
pattern = 'AutoSaveWritePost',
group = group,

callback = function(opts)
if opts.data.saved_buffer ~= nil then
local filename = vim.api.nvim_buf_get_name(opts.data.saved_buffer)
local max_levels = 3
filename = table.concat(vim.split(filename, '/'), '/', math.max(#vim.split(filename, '/') - max_levels + 1, 1))
vim.notify('AutoSave: saved ' .. filename .. ' at ' .. vim.fn.strftime '%H:%M:%S', vim.log.levels.INFO)
end
end,
})
2 changes: 0 additions & 2 deletions overlays/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

wl-clipboard = import ./wl-clipboard;

ollama = import ./ollama;

# For every flake input, aliases 'pkgs.inputs.${flake}' to
# 'inputs.${flake}.packages.${pkgs.system}' or
# 'inputs.${flake}.legacyPackages.${pkgs.system}'
Expand Down
19 changes: 0 additions & 19 deletions overlays/ollama/default.nix

This file was deleted.

0 comments on commit ac9dc62

Please sign in to comment.