about summary refs log tree commit diff
path: root/modules/common/profiles/headless.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/common/profiles/headless.nix')
-rw-r--r--modules/common/profiles/headless.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/modules/common/profiles/headless.nix b/modules/common/profiles/headless.nix
new file mode 100644
index 0000000..cc7c326
--- /dev/null
+++ b/modules/common/profiles/headless.nix
@@ -0,0 +1,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