summary refs log tree commit diff
path: root/mixins/cli.nix
blob: abf40e0988821eb22db41a24b864288ea3578349 (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
{
  pkgs,
  lib,
  config,
  inputs,
  ...
}: {
  imports = [
    inputs.home-manager.nixosModules."home-manager"
  ];
  config = {
    home-manager.users.tzlil = {
      pkgs,
      config,
      nixosConfig,
      ...
    } @ hm: {
      home = {
        packages = with pkgs; [
          rsync
          curl
          ripgrep
          bat
          croc
        ];
        sessionVariables.EDITOR = "nvim";
      };
      programs = {
        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";
            fish_greeting.body = "";
          };
        };
        neovim = {
          enable = true;
          viAlias = true;
          vimAlias = true;
        };
        # gpg = {
        #   enable = true;
        #   mutableKeys = false;
        #   mutableTrust = false;
        #   settings = {
        #     default-key = "E989 C39F 5AE8 2790 F41E  AD50 5FEF 5315 1562 A6CD";
        #     default-recipient-self = true;
        #     auto-key-locate = "local,wkd,keyserver";
        #     keyserver = "hkps://keys.openpgp.org";
        #     auto-key-retrieve = true;
        #     auto-key-import = true;
        #     keyserver-options = "honor-keyserver-url";
        #     no-autostart = true;
        #   };
        # };
      };
      # services.gpg-agent = let
      #   m = 60;
      #   h = 60 * m;
      #   d = 24 * h;
      #   y = 365 * d;
      # in {
      #   enable = true;
      #   enableSshSupport = true;
      #   enableFishIntegration = true;
      #   defaultCacheTtl = 6 * h;
      #   defaultCacheTtlSsh = 6 * h;
      #   maxCacheTtl = 100 * y; # effectively unlimited
      #   maxCacheTtlSsh = 100 * y; # effectively unlimited
      #   sshKeys = ["E989C39F5AE82790F41EAD505FEF53151562A6CD"];
      # };
    };
  };
}