nix/home.nix

99 lines
2.1 KiB
Nix
Raw Normal View History

2022-11-30 19:12:27 +00:00
{ config, lib, pkgs, ... }:
let
inherit (pkgs.lib) mkIf optionals;
inherit (pkgs.stdenv) isLinux isDarwin;
in
2022-11-15 17:32:46 +00:00
{
2022-11-25 16:30:22 +00:00
imports = [
./bash
2022-12-02 23:42:53 +00:00
./direnv
2022-11-25 16:30:22 +00:00
./git
2022-11-30 19:35:03 +00:00
./htop
2022-12-06 23:27:25 +00:00
./kitty
./neofetch
2022-11-25 16:30:22 +00:00
./nvim
./powerline
./readline
];
2022-11-15 17:32:46 +00:00
# Home Manager Config
home.username = "evanreichard";
home.homeDirectory = "/Users/evanreichard";
2024-01-17 15:17:22 +00:00
home.stateVersion = "23.11";
2022-11-15 17:32:46 +00:00
programs.home-manager.enable = true;
# Global Packages
2022-11-25 16:30:22 +00:00
home.packages = with pkgs; [
2022-12-01 16:38:15 +00:00
(nerdfonts.override { fonts = [ "Meslo" ]; })
android-tools
2024-04-26 15:39:10 +00:00
awscli2
2022-11-25 16:30:22 +00:00
bashInteractive
gitAndTools.gh
2022-12-06 23:27:25 +00:00
google-cloud-sdk
2022-12-10 17:27:51 +00:00
imagemagick
2022-11-25 16:30:22 +00:00
kubectl
mosh
neofetch
2022-12-10 17:27:51 +00:00
pre-commit
2022-11-25 16:30:22 +00:00
python311
2024-05-09 20:30:33 +00:00
ssm-session-manager-plugin
2022-11-25 16:30:22 +00:00
tldr
2022-11-30 19:12:27 +00:00
] ++ optionals isDarwin [
2022-12-06 23:27:25 +00:00
kitty
] ++ optionals isLinux [ ];
2022-11-15 17:32:46 +00:00
# GitHub CLI
programs.gh = {
enable = true;
settings = {
git_protocol = "ssh";
};
};
2022-11-30 19:12:27 +00:00
# Misc Programs
programs.htop.enable = true;
2022-11-15 17:32:46 +00:00
programs.jq.enable = true;
programs.k9s.enable = true;
2022-11-15 17:32:46 +00:00
programs.pandoc.enable = true;
2024-01-17 15:17:22 +00:00
# Enable Flakes & Commands
nix = {
package = pkgs.nix;
extraOptions = ''experimental-features = nix-command flakes'';
};
2023-08-31 13:03:45 +00:00
# SQLite Configuration
2022-11-30 19:12:27 +00:00
home.file.".sqliterc".text = ''
.headers on
.mode column
'';
# Darwin Spotlight Indexing Hack
home.activation = mkIf isDarwin {
copyApplications =
let
apps = pkgs.buildEnv {
name = "home-manager-applications";
paths = config.home.packages;
pathsToLink = "/Applications";
};
in
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
2022-11-30 19:12:27 +00:00
baseDir="$HOME/Applications/Home Manager Apps"
if [ -d "$baseDir" ]; then
rm -rf "$baseDir"
fi
mkdir -p "$baseDir"
for appFile in ${apps}/Applications/*; do
target="$baseDir/$(basename "$appFile")"
$DRY_RUN_CMD cp ''${VERBOSE_ARG:+-v} -fHRL "$appFile" "$baseDir"
$DRY_RUN_CMD chmod ''${VERBOSE_ARG:+-v} -R +w "$target"
done
'';
2022-11-30 19:12:27 +00:00
};
# Darwin Spotlight Indexing Hack
disabledModules = [ "targets/darwin/linkapps.nix" ];
2022-11-15 17:32:46 +00:00
}