diff --git a/dotfiles/.gitconfig b/dotfiles/.gitconfig new file mode 100644 index 0000000..25d20f1 --- /dev/null +++ b/dotfiles/.gitconfig @@ -0,0 +1,29 @@ +[user] + email = root@ivnglkv.me + name = Ivan Golikov + +[push] + default = current + +[diff] + external = difft + tool = difftastic + +[difftool] + prompt = false + +[difftool "difftastic"] + cmd = difft "$LOCAL" "$REMOTE" + +[pager] + difftool = true + +[credential] + helper = cache --timeout=600 + +[core] + editor = nvim + autocrlf = input + +[init] + defaultBranch = main diff --git a/home.nix b/home.nix index f3cee3b..e86a0ec 100644 --- a/home.nix +++ b/home.nix @@ -17,31 +17,27 @@ # The home.packages option allows you to install Nix packages into your # environment. - home.packages = [ - pkgs.obsidian - pkgs.kitty - pkgs.git - pkgs.darktable - pkgs.gparted - pkgs.telegram-desktop - pkgs.keepassxc - pkgs.libreoffice - pkgs.ungoogled-chromium - pkgs.difftastic - pkgs.uv - pkgs.lazygit - pkgs.zoxide - pkgs.qmk - pkgs.dos2unix - pkgs.gnumake - pkgs.ripgrep - pkgs.github-copilot-cli - pkgs.nerd-fonts.iosevka-term - pkgs.fzf - # # Adds the 'hello' command to your environment. It prints a friendly - # # "Hello, world!" when run. - # pkgs.hello - + home.packages = with pkgs; [ + obsidian + kitty + git + darktable + gparted + telegram-desktop + keepassxc + libreoffice + ungoogled-chromium + difftastic + uv + lazygit + zoxide + qmk + dos2unix + gnumake + ripgrep + github-copilot-cli + nerd-fonts.iosevka-term + fzf # # It is sometimes useful to fine-tune packages, for example, by applying # # overrides. You can do that directly here, just don't forget the # # parentheses. Maybe you want to install Nerd Fonts with a limited number of @@ -63,6 +59,7 @@ # # the Nix store. Activating the configuration will then make '~/.screenrc' a # # symlink to the Nix store copy. # ".screenrc".source = dotfiles/screenrc; + ".gitconfig".source = dotfiles/.gitconfig; # # You can also set the file content immediately. # ".gradle/gradle.properties".text = '' diff --git a/nvim/config.lua b/nvim/config.lua index 93efdac..0d779e7 100644 --- a/nvim/config.lua +++ b/nvim/config.lua @@ -36,3 +36,12 @@ require'nvim-treesitter.configs'.setup { }, } vim.opt.runtimepath:append(vim.fn.stdpath "data" .. "site") + +-- Load last session when started without arguments +vim.api.nvim_create_autocmd("VimEnter", { + callback = function() + if vim.fn.argc() == 0 then + require("persistence").load() + end + end, +})