summaryrefslogtreecommitdiffstats
path: root/home.nix
blob: ce48a66e51b2f21964132cd76c0eb93f99aceebf (plain) (blame)
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
{
  config,
  pkgs,
  ...
}: {
  # home.username = username;
  # home.homeDirectory = homeDir;
  # 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.
  home.stateVersion = "25.11";
  programs.home-manager.enable = true;

  programs.fzf = {
    enable = true;
    enableZshIntegration = true;
  };
  programs.zoxide = {
    enable = true;
    enableZshIntegration = true;
  };

  home.file = {
    ".config/senpai/senpai.scfg".source = ./dotfiles/senpai/senpai.scfg;
  };

  programs.emacs = {
    enable = true;
    extraConfig = ''
      ;;; -*- lexical-binding: t -*-
      (custom-set-variables
       ;; custom-set-variables was added by Custom.
       ;; If you edit it by hand, you could mess it up, so be careful.
       ;; Your init file should contain only one such instance.
       ;; If there is more than one, they won't work right.
       '(custom-enabled-themes '(modus-vivendi-tinted))
       '(rcirc-default-nick "Skullheadx")
       '(rcirc-server-alist
         '(("irc.libera.chat" :port 6697 :channels ("#emacs" "#lobsters" "#openbsd")
            :encryption tls))))
      (custom-set-faces
       ;; custom-set-faces was added by Custom.
       ;; If you edit it by hand, you could mess it up, so be careful.
       ;; Your init file should contain only one such instance.
       ;; If there is more than one, they won't work right.
       )
      (global-set-key (kbd "C-c l") #'org-store-link)
      (global-set-key (kbd "C-c a") #'org-agenda)
      (global-set-key (kbd "C-c c") #'org-capture)
      (setq org-agenda-files '("~/org"))
      (setq org-todo-keywords
            '((sequence
               "TODO(t)"
               "NEXT(n)"
               "WAIT(w@)"
               "|"
               "DONE(d)"
               "CANCELLED(c@)")))
      (setq org-capture-templates
            '(("t" "Todo" entry
               (file "~/org/inbox.org")
               "* TODO %?\n%U")))
      (setq org-agenda-custom-commands
            '(("n" "Next Actions"
               todo "NEXT")))
      (setq org-log-done 'time)

      (fido-vertical-mode 1)

      ;; Nix syntax
      (use-package nix-mode
        :mode "\\.nix\\'")

      ;; LSP
      (use-package lsp-mode
        :hook (nix-mode . lsp-deferred))

      ;; Optional UI helpers
      (use-package lsp-ui
        :commands lsp-ui-mode)

      ;; Formatting
      (use-package apheleia
        :config
        (setf (alist-get 'nix-mode apheleia-mode-alist) 'alejandra)
        (apheleia-global-mode +1))
    '';
    extraPackages = epkgs:
      with epkgs; [
        nix-mode
        lsp-mode
        lsp-ui
        apheleia
      ];
  };
}