98 lines
2 KiB
Nix
98 lines
2 KiB
Nix
# basic tui apps and configs for headless setup
|
|
{ config, pkgs, ... }:
|
|
let
|
|
mergedBashFiles = pkgs.symlinkJoin {
|
|
name = "merged-bash-files";
|
|
paths = [
|
|
../../dotfiles/bash_files/all_hosts
|
|
../../dotfiles/bash_files/${config.host}
|
|
];
|
|
};
|
|
in
|
|
{
|
|
config = {
|
|
environment.variables = {
|
|
NIXHOST = "${config.host}";
|
|
EDITOR = "nvim";
|
|
BAT_THEME = "gruvbox-dark";
|
|
};
|
|
system.tools.nixos-option.enable = true;
|
|
|
|
home-manager.users.${config.user} = { pkgs, ... }: {
|
|
home.packages = with pkgs; [
|
|
bat
|
|
bat-extras.batman
|
|
git
|
|
lazygit
|
|
htop
|
|
btop
|
|
openssl
|
|
nixpkgs-fmt
|
|
nodejs
|
|
ripgrep
|
|
jq
|
|
file
|
|
wget
|
|
unzip
|
|
rclone
|
|
killall
|
|
tree
|
|
lm_sensors
|
|
autogen
|
|
];
|
|
|
|
programs.neovim = {
|
|
enable = true;
|
|
vimAlias = true;
|
|
viAlias = true;
|
|
};
|
|
|
|
programs.tmux = {
|
|
enable = true;
|
|
plugins = with pkgs; [
|
|
tmuxPlugins.continuum
|
|
tmuxPlugins.resurrect
|
|
tmuxPlugins.sensible
|
|
];
|
|
};
|
|
xdg.configFile.nvim = {
|
|
recursive = true;
|
|
source = ../../dotfiles/nvim;
|
|
};
|
|
|
|
home.file = {
|
|
".profile" = {
|
|
text = ''
|
|
source ~/.bashrc
|
|
'';
|
|
};
|
|
};
|
|
home.file = {
|
|
".bashrc" = {
|
|
text = ''
|
|
BASH_DIR=~/.bash_files
|
|
|
|
# Check if the directory exists
|
|
if [ -d "$BASH_DIR" ]; then
|
|
# Loop through each file in the directory
|
|
for file in "$BASH_DIR"/*; do
|
|
# Check if it's a regular file (not a directory)
|
|
if [ -f "$file" ]; then
|
|
# Source the file
|
|
. "$file"
|
|
fi
|
|
done
|
|
fi
|
|
|
|
'';
|
|
};
|
|
};
|
|
home.file.".bash_files" = {
|
|
recursive = true;
|
|
source = mergedBashFiles;
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|
|
|