about summary refs log tree commit diff
path: root/home.nix
blob: 7cf5f664371e0cedc7a62307f7d12c94d72808ee (plain)
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
{ config, lib, pkgs, system, nix-darwin-emacs, ... }:
let
  isDarwin = builtins.match ".*-darwin" system != null;

  emacsPackage =
    if isDarwin
    then nix-darwin-emacs.packages.${system}.emacs-30
    else pkgs.emacs-pgtk;

  homeDirectory =
    if isDarwin
    then "/Users/venomade"
    else "/home/venomade";
in
{
  home.username = "venomade";
  home.homeDirectory = homeDirectory;
  home.packages = with pkgs; [

    # Neovim
    neovim
    imagemagick
    fzf
    ripgrep
    fd

    # Emacs
    emacsPackage
    emacs-lsp-booster

    # Kakoune
    kakoune
    kakoune-lsp
    expect

    # Nix
    nil

    # Lua
    lua-language-server
    lua5_4

    # Rust
    rustc
    cargo
    rust-analyzer
    clippy

    # C
    clang
    clang-tools
    bear
    valgrind

    # Lisp
    luaPackages.fennel
    fnlfmt
    fennel-ls

    # Shell
    zsh
    tmux
    bat
    bat-extras.batman
    bat-extras.batdiff
    eza
    jellyfin-tui
    lazygit
    starship
    yazi
    zk
    harper
    translate-shell

  ] ++ lib.optionals isDarwin [
    lima
  ];
  programs.git = {
    enable = true;
    settings.user = {
      name = "venomade";
      email = "venomade@venomade.com";
    };
  };

  home.stateVersion = "25.11";
  programs.home-manager.enable = true;
	home.file =
    let
      configDir = "${config.home.homeDirectory}/.dotfiles/config";
      dotsDir = "${config.home.homeDirectory}/.dotfiles/dots";

      configEntries = lib.mapAttrs
        (name: _: {
          target = ".config/${name}";
          source = config.lib.file.mkOutOfStoreSymlink "${configDir}/${name}";
          recursive = true;
        })
        (lib.filterAttrs
          (name: type: type == "directory")
          (builtins.readDir ./config));

      dotsEntries = lib.mapAttrs
        (name: _: {
          target = ".${name}";
          source = config.lib.file.mkOutOfStoreSymlink "${dotsDir}/${name}";
        })
        (lib.filterAttrs
          (name: type: type == "regular")
          (builtins.readDir ./dots));
    in
      configEntries // dotsEntries;
}