aboutsummaryrefslogtreecommitdiff
path: root/home.nix
blob: 0a33f90c53a725ff536802c1c128943035991c0d (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
{ config, pkgs, ... }:

let
  sources = import ./nix/sources.nix;
  pkgs = import sources.nixpkgs { };
  pkgs-unstable = import sources.nixpkgs-unstable { };
  pkgs-personal = import sources.mypkgs { };

in {
  _module.args.sources = sources;
  _module.args.pkgs-unstable = pkgs-unstable;
  _module.args.pkgs-personal = pkgs-personal;
  
  imports = [
  # define options custom to this config
    ./custom.nix
  # load host specific stuff
    ./host/current.nix
  # task shortcuts
    ./module/tasker.nix 
    ./tasks/default.nix
  ];

  home = {
    keyboard.layout = "de";

    packages = [
      pkgs-personal.persistent-nix-shell
    ];
  };

  programs.git = {
    enable = true;
    package = pkgs.gitAndTools.gitFull;
    lfs.enable = true;

    userName  = "Adrian Kummerlaender";
    userEmail = "adrian@kummerlaender.eu";

    extraConfig = {
      core.editor = "vim";
      merge.tool = "${pkgs.meld}/bin/meld";
      pull.ff = "only";
    };
  };

  programs.ssh = {
    enable = true;
    matchBlocks = {
      "automatix" = {
        hostname = "kummerlaender.eu";
        user = "common";
      };
      "majestix" = {
        hostname = "10.100.0.3";
        user = "common";
      };
      "horst" = {
        proxyCommand = "ssh majestix -W %h:%p";
        hostname = "MVMITS177.mvm.kit.edu";
        user = "urdzx";
      };
    };
  };

  systemd.user.startServices = true;

  services.gpg-agent = {
    enable = true;
    enableSshSupport    = true;
    enableScDaemon      = false;

    defaultCacheTtl    = 43200;
    maxCacheTtl        = 43200;
    defaultCacheTtlSsh = 43200;
    maxCacheTtlSsh     = 43200;
  };

  programs.fish = {
    enable = true;
    shellAliases = {
      ns  = "persistent-nix-shell -s";
      cat = "bat --plain";
    };
  };

  programs.direnv = {
    enable = true;
    enableNixDirenvIntegration = true;
  };

  xdg.mimeApps.enable = true;
}