summaryrefslogtreecommitdiff
path: root/modules/common/profiles/default.nix
blob: a17ff0819eebbd60ff9353de06f5c5e8e522ee24 (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
{
  config,
  lib,
  pkgs,
  this,
  ...
}:
with lib; let
  cfg = config.nixfiles.modules.profiles.default;
in {
  imports = [
    ./dev
    ./email.nix
    ./headful.nix
    ./headless.nix
  ];

  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.
        '';
      }
    ];

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

    time.timeZone = "Europe/Moscow";

    environment.systemPackages = with pkgs; [
      file
      tree
    ];
  };
}