summary refs log tree commit diff
path: root/mixins/cli.nix
blob: 9ce9ee4d6ea8c4a4e88c66c344e15bd6289a763a (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
{
  pkgs,
  lib,
  config,
  inputs,
  ...
}: {
  imports = [
    inputs.home-manager.nixosModules."home-manager"
  ];
  config = {
    home-manager.users.tzlil = {pkgs, ...} @ hm: {
      home = {
        packages = with pkgs; [
          rsync
          curl
          ripgrep
          bat
          croc
        ];
        sessionVariables.EDITOR = "nvim";
      };
      programs = {
        ssh.enable = true;
        git = {
          userName = "tzlil";
          userEmail = "tzlils@protonmail.com";
          enable = true;
        };
        direnv = {
          enable = true;
          nix-direnv.enable = true;
        };
        fish = {
          enable = true;
          shellAliases = {
            gc = "git clone";
            l = "ls -alh";
            b = "bat";
          };
          functions = {
            sb.body = "nixos-rebuild build --flake git+ssh://pc/home/tzlil/newflake --use-remote-sudo";
            sw.body = "nixos-rebuild switch --flake git+ssh://pc/home/tzlil/newflake --use-remote-sudo";
          };
        };
        neovim = {
          enable = true;
          viAlias = true;
          vimAlias = true;
        };
      };
    };
  };
}