/
base.nix
66 lines (50 loc) · 1.42 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
{ lib, config, epkgs, dag, ... }:
with lib;
{
options.base = mkOption {
type = types.bool;
default = true;
description = "Whether to enable base";
};
config = mkIf config.base {
packages = with epkgs; [
better-defaults
neotree
gruvbox-theme
which-key
editorconfig
flycheck
company
magit
smooth-scrolling
];
init = {
theme = dag.entryAfter [ "pkgs" ] ''
(load-theme 'gruvbox t)
'';
base = dag.entryAfter [ "theme" ] ''
(require 'better-defaults)
(editorconfig-mode 1)
${lib.optionalString config.usePretest "(pixel-scroll-mode)"}
(setq company-minimum-prefix-length 1)
(setq company-idle-delay 0.3)
(global-company-mode)
(require 'recentf)
(recentf-mode)
(which-key-mode)
(let
((homepath (concat (getenv "HOME") "/.nix-profile/bin"))
(systempath "/run/current-system/sw/bin"))
(setenv "PATH" (concat homepath ":" systempath ":" (getenv "PATH")))
(add-to-list 'exec-path systempath)
(add-to-list 'exec-path homepath)
)
(add-hook 'after-init-hook #'global-flycheck-mode)
(setenv "NIX_REMOTE" "daemon")
(setq custom-file (concat (getenv "HOME") "/.emacs.d/custom.el"))
(load custom-file)
(global-visual-line-mode)
'';
};
};
}