Add home-manager and fix worf
This commit is contained in:
50
hosts/worf/home.nix
Normal file
50
hosts/worf/home.nix
Normal file
@@ -0,0 +1,50 @@
|
||||
{ pkgs
|
||||
, lib
|
||||
, inputs
|
||||
, config
|
||||
, ...
|
||||
}: {
|
||||
|
||||
|
||||
home.packages = with pkgs; [
|
||||
iterm2
|
||||
#element-desktop
|
||||
exa
|
||||
];
|
||||
|
||||
programs = {
|
||||
zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
enableSyntaxHighlighting = true;
|
||||
history.size = 10000;
|
||||
};
|
||||
};
|
||||
|
||||
# symlinks don't work with finder + spotlight, copy them instead
|
||||
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";
|
||||
}
|
||||
Reference in New Issue
Block a user