-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.nix
99 lines (82 loc) · 2.45 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
96
97
98
99
{ pkgs, lib, ... }:
let
vars = import ./vars.nix;
importIf = file: enable: lib.optional enable file;
in
{
home.username = "guibi";
home.homeDirectory = lib.mkForce vars.home-dir;
home.stateVersion = "23.11";
imports = [./node-global-packages] ++ (importIf ./hyprland vars.enable-hyprland);
# Packages to install
home.packages = with pkgs; [
fastfetch
# Fish/Terminal
grc fzf
# Dev env
bun nodejs_22 # TypeScript
rustup # Rust
nixd # Nix
python3Full ruff # Python
openjdk21_headless jdt-language-server # Java
gnumake # C++
];
# Programs config
programs = {
# Fish shell config
fish = {
enable = true;
interactiveShellInit = ''
function fish_greeting
fastfetch -c ~/.config/fastfetch/greeting.jsonc
end
'';
plugins = [
{ name = "grc"; src = pkgs.fishPlugins.grc.src; }
{ name = "tide"; src = pkgs.fishPlugins.tide.src; }
{ name = "pisces"; src = pkgs.fishPlugins.pisces.src; }
];
};
# Zoxide (cd replacement)
zoxide = {
enable = true;
options = ["--cmd cd"];
enableBashIntegration = true;
enableFishIntegration = true;
};
# Git config
git = {
enable = vars.git.enable or false;
userName = "Laurent Stéphenne";
userEmail = "[email protected]";
# Enable gpg signing if possible
signing = {
signByDefault = vars ? git.gpgKey;
key = vars.git.gpgKey or null;
};
# Allows for git difftool to work with vscode
extraConfig = {
diff.tool = "vscode";
"difftool \"vscode\"".cmd = "code --diff $LOCAL $REMOTE";
pull.rebase = true;
};
};
gpg = {
enable = true;
};
# Let Home Manager install and manage itself
home-manager.enable = true;
};
xdg = {
enable = true;
# .config symlinks
configFile = {
fastfetch.source = ./dotfiles/fastfetch;
};
};
# Env variables
home.sessionVariables = {
NIXPKGS_ALLOW_UNFREE = "1";
EDITOR = if vars.enable-hyprland then "code --wait" else "nano";
};
}