-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.nix
59 lines (51 loc) · 1.74 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
{ config, pkgs, ... }:
{
# 直接将当前文件夹的配置文件,链接到 Home 目录下的指定位置
# home.file.".config/i3/wallpaper.jpg".source = ./wallpaper.jpg;
# 递归将某个文件夹中的文件,链接到 Home 目录下的指定位置
# home.file.".config/i3/scripts" = {
# source = ./scripts;
# recursive = true; # 递归整个文件夹
# executable = true; # 将其中所有文件添加「执行」权限
# };
# 直接以 text 的方式,在 nix 配置文件中硬编码文件内容
# home.file.".xxx".text = ''
# xxx
# '';
# 设置鼠标指针大小以及字体 DPI(适用于 4K 显示器)
xresources.properties = {
"Xcursor.size" = 16;
"Xft.dpi" = 172;
};
# alacritty - 一个跨平台终端,带 GPU 加速功能
programs.alacritty = {
enable = true;
# 自定义配置
settings = {
env.TERM = "xterm-256color";
font = {
size = 12;
draw_bold_text_with_bright_colors = true;
};
scrolling.multiplier = 5;
selection.save_to_clipboard = true;
};
};
programs.bash = {
enable = true;
enableCompletion = true;
# TODO 在这里添加你的自定义 bashrc 内容
bashrcExtra = ''
export PATH="$PATH:$HOME/bin:$HOME/.local/bin:$HOME/go/bin"
'';
# TODO 设置一些别名方便使用,你可以根据自己的需要进行增删
shellAliases = {
vi = "hx";
k = "kubectl";
urldecode = "python3 -c 'import sys, urllib.parse as ul; print(ul.unquote_plus(sys.stdin.read()))'";
urlencode = "python3 -c 'import sys, urllib.parse as ul; print(ul.quote_plus(sys.stdin.read()))'";
};
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}