about summary refs log tree commit diff
path: root/modules/profiles/headless.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2024-04-21 02:15:42 +0300
committerAzat Bahawi <azat@bahawi.net>2024-04-21 02:15:42 +0300
commite6ed60548397627bf10f561f9438201dbba0a36e (patch)
treef9a84c5957d2cc4fcd148065ee9365a0c851ae1c /modules/profiles/headless.nix
parent2024-04-18 (diff)
2024-04-21
Diffstat (limited to '')
-rw-r--r--modules/profiles/headless.nix (renamed from modules/nixos/profiles/headless.nix)15
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/nixos/profiles/headless.nix b/modules/profiles/headless.nix
index f3f3572..7733f3e 100644
--- a/modules/nixos/profiles/headless.nix
+++ b/modules/profiles/headless.nix
@@ -2,6 +2,7 @@
   config,
   lib,
   pkgs,
+  this,
   ...
 }:
 with lib;
@@ -9,6 +10,10 @@ let
   cfg = config.nixfiles.modules.profiles.headless;
 in
 {
+  options.nixfiles.modules.profiles.headless.enable = mkEnableOption "headless profile" // {
+    default = this.isHeadless;
+  };
+
   config = mkIf cfg.enable {
     nixfiles.modules = {
       openssh.server.enable = true;
@@ -20,6 +25,11 @@ in
       promtail.enable = false; # FIXME High RAM usage.
     };
 
+    hm.home.file = {
+      ".hushlogin".text = "";
+      ".bash_history".source = config.hm.lib.file.mkOutOfStoreSymlink "/dev/null";
+    };
+
     # Pin version to prevent any surprises. Try keeping this up-to-date[1] with
     # the latest LTS release + hardened patches (just in case).
     #
@@ -39,6 +49,11 @@ in
       };
     };
 
+    environment.systemPackages = with pkgs; [
+      alacritty.terminfo
+      foot.terminfo
+    ];
+
     services.udisks2.enable = false;
 
     xdg.sounds.enable = false;

Consider giving Nix/NixOS a try! <3