-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.nix
163 lines (152 loc) · 3.62 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
{ config, pkgs, lib, ... }:
let
username = "alex";
homeDirectory = "/home/alex";
defaultPkgs = with pkgs; [
# UI
brave
calibre
discord
firefox
fragments
kooha #record screen
obsidian
slack
vlc
zoom-us
zotero
mixxx
# hacky stuff
# mdbook
pre-commit
tldr
tmux
xclip
yt-dlp
# dev toolchains
nodejs
# nodePackages.pnpm
python
gcc
cargo
rustc
rust-analyzer
];
haskellPkgs = with pkgs.haskellPackages; [
#brittany # code formatter
cabal2nix # convert cabal projects to nix
cabal-install # package manager
ghc # compiler
haskell-language-server # haskell IDE (ships with ghcide)
hoogle # documentation
nix-tree # visualize nix dependencies
ihaskell
haskell-ci
fourmolu
#ihaskell-blaze
#ghcup
];
in
{
dconf = {
enable = true;
settings."org/gnome/desktop/calendar".show-weekdate = true;
};
programs = {
# Let Home Manager install and manage itself:
home-manager.enable = true;
# autorandr.enable = true; #external monitor
bash = {
enable = true;
profileExtra = ''
if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then
GIT_PROMPT_ONLY_IN_REPO=1
source $HOME/.bash-git-prompt/gitprompt.sh
fi
'';
};
direnv = {
enable = true;
enableBashIntegration = true; # see note on other shells below
nix-direnv.enable = true;
};
git = {
enable = true;
userName = "Alex";
userEmail = "[email protected]";
diff-so-fancy.enable = true;
signing = {
signByDefault = true;
key = "971F 77E6 B2E3 8931 2A89 65B7 6A7D 30C3 EFF7 B815";
};
extraConfig = {
commit.gpgsign = true;
tag.gpgsign = true;
gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers";
};
};
gpg = {
enable = true;
};
# Neovim is starting to get huge; should move to a separate file.
neovim = {
enable = true;
coc.enable = true;
coc.settings = {
"suggest.noselect" = true;
"suggest.enablePreview" = true;
"suggest.enablePreselect" = false;
"suggest.disableKind" = true;
languageserver = {
haskell = {
command = "haskell-language-server-wrapper";
args = [ "--lsp" ];
rootPatterns = [
"*.cabal"
"stack.yaml"
"cabal.project"
"package.yaml"
"hie.yaml"
];
filetypes = [ "haskell" "lhaskell" ];
};
};
};
plugins = with pkgs.vimPlugins; [
vim-nix
coc-tsserver
coc-rust-analyzer
];
# extraConfig = lib.fileContents ./init.vim;
extraConfig = ''
lua << EOF
${lib.strings.fileContents ./init.lua}
EOF
'';
};
};
services = {
gnome-keyring.enable = true;
gpg-agent = {
enable = true;
pinentryPackage = pkgs.pinentry-gnome3;
};
};
home = {
inherit username homeDirectory;
# 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 can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
stateVersion = "21.11";
packages = defaultPkgs ++ haskellPkgs;
sessionVariables = {
#DISPLAY = ":0";
EDITOR = "nvim";
};
};
}