refactor: final architecture audit and hardening

This commit is contained in:
Bernardo Magri
2026-04-06 21:49:34 +01:00
parent 8b4e9ef6c8
commit 0ce8602384
6 changed files with 85 additions and 41 deletions

45
modules/home/bash.nix Normal file
View File

@@ -0,0 +1,45 @@
{ config, lib, ... }:
{
programs.bash = {
enable = true;
# Safely append user's custom RC file after NixOS setup
bashrcExtra = ''
if [[ -f ~/.config/nomarchy/default/bash/rc ]]; then
source ~/.config/nomarchy/default/bash/rc
fi
'';
# Import aliases from the static file logic
shellAliases = lib.mkDefault {
# File system
lsa = "ls -a";
# Directories
".." = "cd ..";
"..." = "cd ../..";
"...." = "cd ../../..";
# Tools
c = "opencode";
d = "docker";
r = "rails";
t = "tmux attach || tmux new -s Work";
# Git
g = "git";
gcm = "git commit -m";
gcam = "git commit -a -m";
gcad = "git commit -a --amend";
# NixOS specific (inherited from default.nix but keeping here for consistency)
sys-update = "sudo nixos-rebuild switch --flake /etc/nixos#default --impure";
env-update = "nomarchy-preflight-migration && home-manager switch --flake /etc/nixos#default --impure";
};
};
# Ensure the directory exists in the user's home via xdg.configFile
# This mapping is likely already handled in configs.nix, but we ensure it here
# or in the main config mapping.
}