-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.nix
75 lines (64 loc) · 1.79 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
{ lib, pkgs, specialArgs, ... }:
let
inherit (lib) mkIf;
inherit (pkgs.stdenv) isLinux isDarwin;
isTermux = builtins.getEnv "TERMUX_VERSION" != "";
in
{
imports = [
./home/bash.nix
./home/git.nix
./home/k9s.nix
./home/packages.nix
./home/variables.nix
./home/zsh.nix
] ++ lib.optional (builtins.pathExists ./home/ssh.nix) ./home/ssh.nix;
zshModule.isTermux = isTermux;
home = {
homeDirectory = mkIf isLinux (builtins.getEnv "HOME");
username = mkIf isLinux (builtins.getEnv "USER");
stateVersion = "24.11";
sessionPath = [
"$HOME/.local/bin"
"$HOME/go/bin"
];
activation = mkIf isTermux {
termuxInit = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
run mkdir -p "$HOME/.termux" && cat "${builtins.toString ./dotfiles/termux/termux.properties}" > "$HOME/.termux/termux.properties" && cat "${builtins.toString ./dotfiles/termux/colors.properties}" > "$HOME/.termux/colors.properties"
run ln -f -s /android/system/bin/linker64 /system/bin/linker64
run ln -f -s /android/system/bin/ping /system/bin/ping
run [ -L $HOME/sdcard ] || ln -s /sdcard $HOME/sdcard
run mkdir -p ~/.npm/lib
'';
};
};
programs = {
home-manager = {
enable = true;
};
direnv = {
enable = true;
enableZshIntegration = true;
nix-direnv.enable = true;
};
htop = {
enable = true;
settings = {
left_meters = [ "LeftCPUs2" "Memory" "Swap" ];
left_right = [ "RightCPUs2" "Tasks" "LoadAverage" "Uptime" ];
setshowProgramPath = false;
treeView = true;
};
};
jq = {
enable = true;
};
nix-index = {
enable = true;
};
fzf = {
enable = true;
enableZshIntegration = true;
};
};
}