nixos-config/hosts/worf/home.nix

53 lines
1.2 KiB
Nix
Raw Normal View History

2023-07-26 10:48:52 +02:00
{ pkgs
, lib
, inputs
, config
, ...
}: {
home.packages = with pkgs; [
2023-07-26 15:22:24 +02:00
discord
2023-07-26 10:48:52 +02:00
exa
2023-07-26 15:22:24 +02:00
iterm2
neovim
vscode
2023-07-26 10:48:52 +02:00
];
programs = {
zsh = {
enable = true;
enableAutosuggestions = true;
enableSyntaxHighlighting = true;
history.size = 10000;
};
};
2023-07-26 15:22:24 +02:00
# Copy Applications to ~/Applications to allow them to be launched from Spotlight
2023-07-26 10:48:52 +02:00
disabledModules = [ "targets/darwin/linkapps.nix" ];
home.activation = lib.mkIf pkgs.stdenv.isDarwin {
copyApplications =
let
apps = pkgs.buildEnv {
name = "home-manager-applications";
paths = config.home.packages;
pathsToLink = "/Applications";
};
in
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
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
'';
};
home.stateVersion = "23.05";
}