about summary refs log tree commit diff
path: root/modules/common/profiles/headless.nix
blob: cc7c326ef17b00519dd23c4edad3de542e7abc62 (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
{
  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];
  };
}

Consider giving Nix/NixOS a try! <3