-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase.nix
138 lines (127 loc) · 2.6 KB
/
base.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
{
inputs,
custom,
config,
lib,
pkgs,
...
}:
let
cfg = config.modules.base;
privateDir = "${inputs.privateConfig}";
in
{
options.modules.base = {
gpgKey = lib.mkOption {
type = lib.types.str;
default = null;
};
};
imports = [ ./. ];
config = {
nix.registry = {
this.flake = inputs.nixpkgs;
n.to = {
id = "nixpkgs";
type = "indirect";
};
d.to = {
owner = "kenranunderscore";
repo = "dotfiles";
type = "github";
};
};
modules = {
alacritty.enable = false;
firefox.enable = true;
kitty.enable = true;
bat.enable = true;
direnv.enable = true;
email.enable = true;
fish.enable = true;
fzf.enable = true;
pass = {
enable = true;
inherit (cfg) gpgKey;
};
ssh.enable = true;
tmux.enable = true;
zsh.enable = true;
};
fonts.fontconfig.enable = lib.mkForce true;
programs = {
gpg.enable = true;
home-manager.enable = true;
# TODO(Johannes): Customize colors?
jq.enable = true;
nix-index = {
enable = true;
enableFishIntegration = true;
enableZshIntegration = true;
enableBashIntegration = true;
};
};
xdg = {
enable = true;
mime.enable = true;
};
home =
let
inherit (custom) username;
in
{
inherit username;
homeDirectory = "/home/${username}";
sessionVariables = rec {
EDITOR = "emacsclient -c";
VISUAL = EDITOR;
ALTERNATE_EDITOR = "";
KENRAN_IRC_CERTS = "${privateDir}/irc";
OPENSSL_DIR = "${pkgs.openssl.dev}";
};
packages = with pkgs; [
autoconf
automake
binutils
cacert
cmake
curl
fd
feh
file
fontconfig.dev
gh
gnumake
htop
jq
man-pages
nixfmt-rfc-style
nixpkgs-review
openssl.dev
pciutils
perl
pkgconf
ripgrep
rlwrap
rsync
scrot
shellcheck
shfmt
timer
tree
unixtools.nettools
unzip
usbutils
watchexec
wget
xcolor
xorg.xkill
];
activation = {
importGpgKey = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
$DRY_RUN_CMD ${lib.getExe pkgs.gnupg} --import ${privateDir + "/gpg.key"}
'';
};
};
};
}