summaryrefslogtreecommitdiff
path: root/modules/common/profiles/headless.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-02-19 17:50:35 +0300
committerAzat Bahawi <azat@bahawi.net>2023-02-19 17:50:35 +0300
commit91fb4f28ef5d87e8bcf7749928d30ba4a9cbbd34 (patch)
treee07291fcb1cf62a561ffe58d1fd8e2968ff6fcb3 /modules/common/profiles/headless.nix
parentf1e8dc736a904703eaa97ccf3d5cde3f69101c38 (diff)
2023-02-19
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];
+ };
+}