-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.nix
95 lines (85 loc) · 2.64 KB
/
home.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{ config, pkgs, ... }:
let
xdg = config.xdg;
in
{
home.username = "jankleine";
home.homeDirectory = "/Users/jankleine";
# 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 should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "24.05"; # Please read the comment before changing.
home.packages = [
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello
];
home.file = {
# Disable generation of .zshenv in home directory. ZDOTDIR is set globally
# in /etc/zshenv, which is managed by nix-darwin.
".zshenv".enable = false;
};
home.sessionVariables = {
EDITOR = "nvim";
# XDG Data
_Z_DATA = "${xdg.dataHome}/z/z";
VSCODE_EXTENSIONS = "${xdg.dataHome}/vscode/extensions";
AZURE_CONFIG_DIR = "${xdg.dataHome}/azure";
TASKDATA = "${xdg.dataHome}/task";
CARGO_HOME = "${xdg.dataHome}/cargo";
RUSTUP_HOME = "${xdg.dataHome}/rustup";
GRADLE_USER_HOME = "${xdg.dataHome}/gradle";
LEIN_HOME = "${xdg.dataHome}/lein";
VAGRANT_HOME = "${xdg.dataHome}/vagrant";
VAGRANT_ALIAS_FILE = "${xdg.dataHome}/vagrant/aliases";
GNUPGHOME = "${xdg.dataHome}/gnupg";
LESSHISTFILE = "${xdg.dataHome}/lesshst";
};
home.shellAliases = {
".." = "cd ..";
"ll" = "ls -lahp --color=auto";
"vim" = "nvim";
"hm" = "home-manager";
};
xdg.enable = true;
programs.zsh = {
enable = true;
dotDir = ".config/zsh";
history = {
extended = true;
path = "${xdg.dataHome}/zsh/zsh_history";
save = 100000;
size = 100000;
};
initExtra = ''
source ${xdg.configHome}/home-manager/zsh/powerlevel10k/powerlevel10k.zsh-theme
source ${xdg.configHome}/home-manager/zsh/.p10k.zsh
'';
autosuggestion.enable = true;
syntaxHighlighting = {
enable = true;
highlighters = [
"brackets"
];
};
plugins = [
{
# adds z command for convenient directory switching
name = "zsh-z";
src = pkgs.fetchFromGitHub {
owner = "agkozak";
repo = "zsh-z";
rev = "afaf296"; # latest commit as of 2024-11-30
hash = "sha256-FnGjp/VJLPR6FaODY0GtCwcsTYA4d6D8a6dMmNpXQ+g=";
};
}
];
};
programs.fzf.enable = true;
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}