summaryrefslogtreecommitdiff
path: root/modules/profiles/default.nix
blob: 61f93b9b82068c176ec74a7a4d2915115fd816d6 (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
{
  config,
  lib,
  pkgs,
  this,
  ...
}:
with lib;
let
  cfg = config.nixfiles.modules.profiles.default;
in
{
  imports = attrValues (modulesIn ./.);

  options.nixfiles.modules.profiles.default.enable =
    mkEnableOption "The most default profile of them all."
    // {
      default = true;
    };

  config = mkIf cfg.enable {
    assertions = [
      {
        assertion = !(with this; isHeadless && isHeadful);
        message = ''
          The configuration cannot be both "headful" and "headless" at the same
          time.
        '';
      }
    ];

    ark.directories = [ "/var/log" ];

    nixfiles.modules = {
      bat.enable = true;
      eza.enable = true;
      htop.enable = true;
      tmux.enable = true;
      vim.enable = true;
    };

    programs = {
      less = {
        enable = true;
        envVariables.LESSHISTFILE = "-";
      };

      nano.enable = false;
    };

    environment.systemPackages = with pkgs; [
      cryptsetup
      file
      lshw
      lsof
      pciutils
      psmisc
      smartmontools
      sysstat
      tree
      util-linux
    ];
  };
}