refactor: final architecture audit and hardening
This commit is contained in:
45
modules/home/bash.nix
Normal file
45
modules/home/bash.nix
Normal 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.
|
||||
}
|
||||
@@ -32,6 +32,7 @@ in
|
||||
./swayosd.nix
|
||||
./security.nix
|
||||
./battery-monitor.nix
|
||||
./bash.nix
|
||||
];
|
||||
|
||||
colorScheme = lib.mkDefault (palettes.${config.nomarchy.theme} or palettes.nord);
|
||||
@@ -59,8 +60,5 @@ in
|
||||
nerd-fonts.ubuntu-mono
|
||||
] ++ userPackages);
|
||||
|
||||
home.shellAliases = lib.mkDefault {
|
||||
sys-update = "sudo nixos-rebuild switch --flake /etc/nixos#default --impure";
|
||||
env-update = "nomarchy-preflight-migration && home-manager switch --flake /etc/nixos#default --impure";
|
||||
};
|
||||
# Shell aliases are now managed in bash.nix
|
||||
}
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
themeConfig = builtins.fromJSON (builtins.readFile (../../assets/themes + "/${config.nomarchy.theme}/vscode.json"));
|
||||
in
|
||||
{
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscode;
|
||||
userSettings = {
|
||||
"update.mode" = "none";
|
||||
"workbench.colorTheme" = "Nomarchy Theme"; # Example, would need to be generated
|
||||
"workbench.colorTheme" = themeConfig.name;
|
||||
"window.titleBarStyle" = "custom";
|
||||
};
|
||||
# extensions = with pkgs.vscode-extensions; [ ... ];
|
||||
|
||||
Reference in New Issue
Block a user