hm: add fsmonitor-watchman
This commit is contained in:
parent
3686a0f784
commit
a664d6709c
@ -5,7 +5,26 @@
|
|||||||
email,
|
email,
|
||||||
devEnvironment,
|
devEnvironment,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
queryWatchman = with pkgs; let
|
||||||
|
# TODO: this is a perl script which needs $LOCALE_ARCHIVE.
|
||||||
|
# As of writing, I have this in my ~/.bashrc:
|
||||||
|
# export LOCALE_ARCHIVE=/usr/lib/locale/locale-archive
|
||||||
|
fsmon =
|
||||||
|
runCommand "fsmonitor-watchman"
|
||||||
|
{
|
||||||
|
src = "${git}/share/git-core/templates/hooks/fsmonitor-watchman.sample";
|
||||||
|
buildInputs = [gnused];
|
||||||
|
} ''
|
||||||
|
sed -e 's@/usr@${perl}@' $src > $out
|
||||||
|
chmod +x $out
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
writeShellScript "query-watchman" ''
|
||||||
|
export PATH=${pkgs.watchman}/bin:$PATH
|
||||||
|
exec ${fsmon.outPath} "$@"
|
||||||
|
'';
|
||||||
|
in {
|
||||||
home = {
|
home = {
|
||||||
inherit stateVersion;
|
inherit stateVersion;
|
||||||
|
|
||||||
@ -13,10 +32,11 @@
|
|||||||
homeDirectory = "/home/motiejus";
|
homeDirectory = "/home/motiejus";
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages =
|
home.packages = with pkgs;
|
||||||
if devEnvironment
|
[glibcLocales]
|
||||||
then
|
++ (
|
||||||
(with pkgs; [
|
if devEnvironment
|
||||||
|
then [
|
||||||
go
|
go
|
||||||
|
|
||||||
zigpkgs."0.11.0"
|
zigpkgs."0.11.0"
|
||||||
@ -25,8 +45,9 @@
|
|||||||
scala_2_12
|
scala_2_12
|
||||||
metals
|
metals
|
||||||
coursier
|
coursier
|
||||||
])
|
]
|
||||||
else [];
|
else []
|
||||||
|
);
|
||||||
|
|
||||||
programs.direnv.enable = true;
|
programs.direnv.enable = true;
|
||||||
|
|
||||||
@ -76,6 +97,8 @@
|
|||||||
userName = "Motiejus Jakštys";
|
userName = "Motiejus Jakštys";
|
||||||
aliases.yolo = "commit --amend --no-edit -a";
|
aliases.yolo = "commit --amend --no-edit -a";
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
|
core.fsmonitor = queryWatchman.outPath;
|
||||||
|
core.untrackedcache = true;
|
||||||
rerere.enabled = true;
|
rerere.enabled = true;
|
||||||
pull.ff = "only";
|
pull.ff = "only";
|
||||||
merge.conflictstyle = "diff3";
|
merge.conflictstyle = "diff3";
|
||||||
|
Loading…
Reference in New Issue
Block a user