aboutsummaryrefslogtreecommitdiff
path: root/modules/profiles/core.nix
blob: a79505a10a6187284bf15c736ef6389d874ee8fd (plain) (blame)
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
{
  config,
  lib,
  options,
  pkgs,
  ...
}:
{
  config = {
    boot = {
      loader = {
        efi.canTouchEfiVariables = lib.mkDefault true;
        limine = {
          enable = lib.mkDefault config.system.profile.core.enable;
          extraConfig = lib.mkDefault "quiet";
          maxGenerations = lib.mkDefault 10;
          # TODO: secureBoot
        };

        timeout = 1;
      };

      tmp.cleanOnBoot = lib.mkDefault true;
    };

    environment = {
	    systemPackages = with pkgs; [ kakoune ];
	    variables = {
		    EDITOR = "kak";
		    VISUAL = "kak";
	    };
    };

    hardware.enableRedistributableFirmware = lib.mkDefault config.system.profile.core.enable;
    i18n = {
	    defaultLocale = lib.mkDefault "en_CA.UTF-8";
	    extraLocales = [
		    "en_US.UTF-8/UTF-8"
	    ];
    };

    networking = {
	    dhcpcd.enable = lib.mkDefault !config.system.profile.core.enable;
	    nftables.enable = lib.mkDefault config.system.profile.core.enable;
    };

    nix = {
	    gc = {
		    automatic = lib.mkDefault config.system.profile.core.enable;
		    dates = "weekly";
		    options = "--delete-older-than 15d";
	    };

	    settings.experimental-features = [ "flakes" "nix-command" ];
    };

    programs.nano.enable = lib.mkDefault !config.system.profile.core.enable;
  };

  options.system.profile.core.enable = lib.mkEnableOption "the core system profile";
}