From bbfac53f518674e0f52b5500e87d8606b108cb60 Mon Sep 17 00:00:00 2001 From: Sebastian Moser Date: Fri, 10 Nov 2023 18:08:12 +0100 Subject: [PATCH] bash history now in hostname subfolder --- programs/bash.nix | 4 ++-- users/me/default.nix | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/programs/bash.nix b/programs/bash.nix index 9fb8d7f..0bc0e07 100644 --- a/programs/bash.nix +++ b/programs/bash.nix @@ -1,11 +1,11 @@ -{ persistentDir, confDir, ... }: +{ persistentDir, confDir, hostname, ... }: { programs.bash = { enable = true; enableCompletion = true; - historyFile = "${persistentDir}/bash-history"; + historyFile = "${persistentDir}/${hostname}/bash-history"; historyFileSize = 100000; historyControl = [ "ignoredups" ]; historyIgnore = [ diff --git a/users/me/default.nix b/users/me/default.nix index 2446b00..3ff748b 100644 --- a/users/me/default.nix +++ b/users/me/default.nix @@ -1,4 +1,4 @@ -{ pkgs, secretsDir, inputs, ... }: +{ pkgs, secretsDir, inputs, config, ... }: { users.users.me = { isNormalUser = true; @@ -9,6 +9,9 @@ #home-manager._module.args = { inherit inputs; }; home-manager.users.me = import ./home.nix; + home-manager.extraSpecialArgs = { + hostname = config.networking.hostName; + }; fonts.fonts = with pkgs; [ hack-font