parent
36aee0c607
commit
8ca6349e33
37
config.nix
37
config.nix
|
@ -254,7 +254,7 @@
|
||||||
command = "sh";
|
command = "sh";
|
||||||
args = [
|
args = [
|
||||||
"-c"
|
"-c"
|
||||||
"set -o pipefail; ${gotools}/bin/goimports | ${gofumpt}/bin/gofumpt"
|
"set -o pipefail; ${lib.getExe' gotools "goimports"} | ${lib.getExe gofumpt}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -262,7 +262,7 @@
|
||||||
name = "nix";
|
name = "nix";
|
||||||
auto-format = true;
|
auto-format = true;
|
||||||
formatter = {
|
formatter = {
|
||||||
command = "${nixfmt-rfc-style}/bin/nixfmt";
|
command = "${lib.getExe nixfmt-rfc-style}";
|
||||||
args = [ "-q" ];
|
args = [ "-q" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -270,13 +270,44 @@
|
||||||
name = "jsonnet";
|
name = "jsonnet";
|
||||||
auto-format = true;
|
auto-format = true;
|
||||||
formatter = {
|
formatter = {
|
||||||
command = "${jsonnet}/bin/jsonnetfmt";
|
command = "${lib.getExe' jsonnet "jsonnet"}";
|
||||||
args = [ "-" ];
|
args = [ "-" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "python";
|
||||||
|
auto-format = true;
|
||||||
|
formatter = {
|
||||||
|
args = [
|
||||||
|
"format"
|
||||||
|
"--stdin-filename"
|
||||||
|
"file.py"
|
||||||
|
"-"
|
||||||
|
];
|
||||||
|
command = "${lib.getExe ruff}";
|
||||||
|
};
|
||||||
|
language-servers = [ "pylsp" ];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
language-server = {
|
language-server = {
|
||||||
nil.config.nil.nix.flake.autoEvalInputs = true;
|
nil.config.nil.nix.flake.autoEvalInputs = true;
|
||||||
|
pylsp.config.pylsp = {
|
||||||
|
plugins = {
|
||||||
|
flake8.enabled = false;
|
||||||
|
mypy = {
|
||||||
|
dmypy = true;
|
||||||
|
enabled = true;
|
||||||
|
report_progress = true;
|
||||||
|
};
|
||||||
|
pycodestyle.enabled = false;
|
||||||
|
pyflakes.enabled = false;
|
||||||
|
ruff = {
|
||||||
|
enabled = true;
|
||||||
|
extendSelect = [ "I" ];
|
||||||
|
format = [ "I" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
themes = {
|
themes = {
|
||||||
|
|
|
@ -83,7 +83,9 @@
|
||||||
packages.x86_64-linux.default =
|
packages.x86_64-linux.default =
|
||||||
pkgs.runCommand "hx"
|
pkgs.runCommand "hx"
|
||||||
{
|
{
|
||||||
buildInputs = [ pkgs.makeWrapper ];
|
buildInputs = with pkgs; [
|
||||||
|
makeWrapper
|
||||||
|
];
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
|
@ -112,7 +114,9 @@
|
||||||
mkdir -p $out/home/git
|
mkdir -p $out/home/git
|
||||||
ln -s ${ignoreFile} $out/home/git/ignore
|
ln -s ${ignoreFile} $out/home/git/ignore
|
||||||
|
|
||||||
makeWrapper ${pkgs.helix}/bin/hx $out/bin/hx --set HELIX_RUNTIME $out/lib/runtime --set XDG_CONFIG_HOME $out/home
|
makeWrapper ${pkgs.helix}/bin/hx $out/bin/hx \
|
||||||
|
--set HELIX_RUNTIME $out/lib/runtime \
|
||||||
|
--set XDG_CONFIG_HOME $out/home \
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue