diff --git a/modules/home/default.nix b/modules/home/default.nix index 4581249..2205898 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -1,14 +1,9 @@ -{ pkgs -, config -, lib -, ... -}: { - imports = [ ./fish ./nvim ]; +{ pkgs, ... }: { + imports = [ ./fish ./nvim ./tmux.nix ./starship.nix ]; home.packages = with pkgs; [ bat lsd gnupg - tmux colmena ]; @@ -22,6 +17,17 @@ core = { editor = "nvim"; }; pull.rebase = true; }; + aliases = { + a = "add"; + ai = "add -p"; + br = "branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate"; + c = "commit"; + del = "branch -D"; + r = "rebase"; + ri = "rebase -i"; + s = "status"; + sw = "switch"; + }; }; }; } diff --git a/modules/home/fish/default.nix b/modules/home/fish/default.nix index f176e6f..d24d391 100644 --- a/modules/home/fish/default.nix +++ b/modules/home/fish/default.nix @@ -1,8 +1,4 @@ -{ pkgs -, config -, lib -, ... -}: { +{ pkgs, config, lib, ... }: { programs.fish = { enable = true; }; diff --git a/modules/home/nvim/default.nix b/modules/home/nvim/default.nix index fd1a870..4dfc46d 100644 --- a/modules/home/nvim/default.nix +++ b/modules/home/nvim/default.nix @@ -10,6 +10,9 @@ stylua # Telescope ripgrep + ansible-language-server + nil + nixpkgs-fmt ]; plugins = with pkgs.vimPlugins; [ diff --git a/modules/home/nvim/lua/plugins/dashboard.lua b/modules/home/nvim/lua/plugins/dashboard.lua index 3b343b3..6cdea55 100644 --- a/modules/home/nvim/lua/plugins/dashboard.lua +++ b/modules/home/nvim/lua/plugins/dashboard.lua @@ -1,4 +1,7 @@ -local logo = [[ +return { + "nvimdev/dashboard-nvim", + opts = function() + local logo = [[ Nyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanya ██╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗ ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║ @@ -8,16 +11,16 @@ Nyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanyanya ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝ ]] -logo = string.rep("\n", 8) .. logo .. "\n\n" + logo = string.rep("\n", 8) .. logo .. "\n\n" -require("dashboard").setup({ - theme = "doom", - hide = { - statusline = false, - tabline = true, -- hide the tabline - }, - config = { - header = vim.split(logo, "\n"), + require("dashboard").setup({ + theme = "doom", + hide = { + statusline = false, + tabline = true, -- hide the tabline + }, + config = { + header = vim.split(logo, "\n"), -- stylua: ignore center = { { action = "Telescope find_files", desc = " Find file", icon = " ", key = "f" }, @@ -27,6 +30,8 @@ require("dashboard").setup({ { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" }, { action = "qa", desc = " Quit", icon = " ", key = "q" }, }, - footer = { "Meow!!!" }, --your footer - }, -}) + footer = { "Meow!!!" }, --your footer + }, + }) + end, +} diff --git a/modules/home/nvim/lua/plugins/lsp.lua b/modules/home/nvim/lua/plugins/lsp.lua new file mode 100644 index 0000000..a8abc4b --- /dev/null +++ b/modules/home/nvim/lua/plugins/lsp.lua @@ -0,0 +1,18 @@ +return { + { + "neovim/nvim-lspconfig", + opts = { + servers = { + nil_ls = { + settings = { + ["nil"] = { + formatting = { + command = { "nixpkgs-fmt" }, + }, + }, + }, + }, + }, + }, + }, +} diff --git a/modules/home/starship.nix b/modules/home/starship.nix new file mode 100644 index 0000000..e89ce9c --- /dev/null +++ b/modules/home/starship.nix @@ -0,0 +1,121 @@ +{ config, pkgs, lib, ... }: +{ + programs.starship = { + enable = true; + settings = { + format = lib.concatStrings [ + "[┌───────────────────>](bold green)" + "$line_break" + "[│](bold green)$username$hostname:$directory" + "$line_break" + "[└─>](bold green)" + ]; + username = { + style_user = "red bold"; + style_root = "black bold"; + format = "\\[[$user]($style)\\]"; + disabled = false; + show_always = true; + }; + + hostname = { + ssh_only = false; + format = lib.concatStrings [ + "[$ssh_symbol](bold blue)" + "@[$hostname](bold green)" + ]; + }; + + directory = { + truncation_length = 4; + truncation_symbol = "../"; + }; + + status = { + symbol = "🔴"; + format = lib.concatStrings [ "[\\[" "$symbol" "$common_meaning" "$signal_name" "$maybe_int" "\\]]" "($style)" ]; + map_symbol = true; + disabled = false; + }; + + right_format = lib.concatStrings [ + "$vcsh" + "$fossil_branch" + "$git_branch" + "$git_commit" + "$git_state" + "$git_metrics" + "$git_status" + "$hg_branch" + "$pijul_channel" + "$docker_context" + "$package" + "$c" + "$cmake" + "$cobol" + "$daml" + "$dart" + "$deno" + "$dotnet" + "$elixir" + "$elm" + "$erlang" + "$fennel" + "$golang" + "$guix_shell" + "$haskell" + "$haxe" + "$helm" + "$java" + "$julia" + "$kotlin" + "$gradle" + "$lua" + "$nim" + "$nodejs" + "$ocaml" + "$opa" + "$perl" + "$php" + "$pulumi" + "$purescript" + "$python" + "$raku" + "$rlang" + "$red" + "$ruby" + "$rust" + "$scala" + "$swift" + "$terraform" + "$vlang" + "$vagrant" + "$zig" + "$buf" + "$nix_shell" + "$conda" + "$meson" + "$spack" + "$memory_usage" + "$aws" + "$gcloud" + "$openstack" + "$azure" + "$env_var" + "$crystal" + "$custom" + "$sudo" + "$cmd_duration" + "$line_break" + "$jobs" + "$battery" + "$time" + "$status" + "$os" + "$container" + "$shell" + "$character" + ]; + }; + }; +} diff --git a/modules/home/tmux.nix b/modules/home/tmux.nix new file mode 100644 index 0000000..b61acb4 --- /dev/null +++ b/modules/home/tmux.nix @@ -0,0 +1,30 @@ +{ pkgs, config, lib, ... }: { + + programs.tmux = { + enable = true; + + clock24 = true; + shortcut = "a"; + mouse = true; + historyLimit = 30000; + + extraConfig = '' + set -g status-position top + setw -g mode-keys vi + + bind . split-window -h + bind - split-window -v + + set -g base-index 1 + + set -g status-bg black + set -g status-fg green + + set-option -sg escape-time 10 + set-option -g focus-events on + set-option -sa terminal-features ',kitty:RGB' + ''; + + }; + } +