dotfiles/home-nix/home.nix

77 lines
2.0 KiB
Nix
Raw Normal View History

2022-11-06 20:23:10 +00:00
{ config, pkgs,... }:
{
home.username = "nixos";
home.homeDirectory = "/home/nixos";
2022-11-06 22:22:09 +00:00
home.packages = [
pkgs.htop pkgs.ripgrep pkgs.gcc pkgs.fd pkgs.zk
];
2022-11-06 20:23:10 +00:00
home.stateVersion = "22.05";
nixpkgs.config.allowUnfree = true;
2022-11-06 22:22:09 +00:00
## Configs ##
xdg.configFile."nvim/init.lua".text = builtins.readFile ../neovim/init.lua;
xdg.configFile."starship.toml".text = builtins.readFile ../starship/starship.toml;
## Programs ##
programs.zoxide = {
enable = true;
enableZshIntegration = true;
};
programs.tmux = {
enable = true;
shell = "zsh";
extraConfig = builtins.readFile ../tmux/.tmux.conf;
};
programs.exa = {
enable = true;
enableAliases = true;
};
programs.starship = {
enable = true;
enableZshIntegration = true;
};
2022-11-06 20:23:10 +00:00
programs.home-manager.enable = true;
programs.fzf.enable = true;
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
# I use vim-plug, so I probably don't require packaging
# extraConfig actually writes to init-home-manager.vim (not lua)
# https://github.com/nix-community/home-manager/pull/3287
# extraConfig = builtins.readFile ../neovim/init.lua;
};
programs.zsh = {
enable = true;
enableCompletion = true;
enableAutosuggestions = true;
shellAliases = {
nix-rebuild = "sudo nixos-rebuild switch";
2022-11-06 22:22:09 +00:00
hm-switch = "home-manager switch --flake";
2022-11-06 20:23:10 +00:00
};
history = {
size = 10000;
path = "${config.xdg.dataHome}/zsh/history";
};
oh-my-zsh = {
enable = true;
plugins = [ "git" "sudo" "command-not-found" "gitignore" "ripgrep" "rust" ];
};
};
programs.git = {
enable = true;
lfs.enable = true;
aliases = {
2022-11-06 22:22:09 +00:00
a="add"; c="commit"; ca="commit --ammend"; cm="commit -m";
2022-11-06 20:23:10 +00:00
lol="log --graph --decorate --pretty=oneline --abbrev-commit";
2022-11-06 22:22:09 +00:00
lola="log --graph --decorate --pretty=oneline --abbrev-commit --all";
2022-11-06 20:23:10 +00:00
};
extraConfig = {
merge = {tool="vimdiff"; conflictstyle="diff3";};
};
# why is this no longer valid?
# pull = { rebase=true; };
};
}