summaryrefslogtreecommitdiff
path: root/modules/common/profiles/headless.nix
blob: 1f8096c01f21ae62e6a3002c8517c56f213d1838 (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
{
  config,
  lib,
  pkgs,
  this,
  ...
}:
with lib;
let
  cfg = config.nixfiles.modules.profiles.headless;
in
{
  options.nixfiles.modules.profiles.headless.enable = mkEnableOption "headless profile" // {
    default = this.isHeadless;
  };

  config = mkIf cfg.enable {
    hm.home.file = {
      ".hushlogin".text = "";
      ".bash_history".source = config.hm.lib.file.mkOutOfStoreSymlink "/dev/null";
    };

    environment.systemPackages = with pkgs; [ alacritty.terminfo ];
  };
}