Home

helix.drv @main - refs - log -
-
https://git.jolheiser.com/helix.drv.git
My Helix configuration as a Nix derivation
tree log patch
convert to lib.getExe and add py Signed-off-by: jolheiser <git@jolheiser.com>
Signature
-----BEGIN SSH SIGNATURE----- U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgBTEvCQk6VqUAdN2RuH6bj1dNkY oOpbPWj+jw4ua1B1cAAAADZ2l0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5 AAAAQByP1rStOZSRYStyu90eSowj6BmGDoLWtaLzcvIiP5yJfEGpv76fAMY3VO+LAvdNFP dS+9XjESTORm6cZuqLFwg= -----END SSH SIGNATURE-----
jolheiser <git@jolheiser.com>
2 weeks ago
2 changed files, 40 additions(+), 5 deletions(-)
config.nixflake.nix
M config.nixconfig.nix
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
diff --git a/config.nix b/config.nix
index 414a68ba9bb4a7852d4f063520a830a8e5a2020b..a732c0ef12392421e6fa94a620645cb85d0cb4e0 100644
--- a/config.nix
+++ b/config.nix
@@ -254,7 +254,7 @@         formatter = {
           command = "sh";
           args = [
             "-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";
         auto-format = true;
         formatter = {
-          command = "${nixfmt-rfc-style}/bin/nixfmt";
+          command = "${lib.getExe nixfmt-rfc-style}";
           args = [ "-q" ];
         };
       }
@@ -270,13 +270,44 @@       {
         name = "jsonnet";
         auto-format = true;
         formatter = {
-          command = "${jsonnet}/bin/jsonnetfmt";
+          command = "${lib.getExe' jsonnet "jsonnet"}";
           args = [ "-" ];
         };
       }
+      {
+        name = "python";
+        auto-format = true;
+        formatter = {
+          args = [
+            "format"
+            "--stdin-filename"
+            "file.py"
+            "-"
+          ];
+          command = "${lib.getExe ruff}";
+        };
+        language-servers = [ "pylsp" ];
+      }
     ];
     language-server = {
       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 = {
M flake.nixflake.nix
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
diff --git a/flake.nix b/flake.nix
index d7cf81a76a8b99b6f8d9d607826ebe87f02dab52..4b676d1fc0ac8e1a8656441631accca9561c92ef 100644
--- a/flake.nix
+++ b/flake.nix
@@ -83,7 +83,9 @@     {
       packages.x86_64-linux.default =
         pkgs.runCommand "hx"
           {
-            buildInputs = [ pkgs.makeWrapper ];
+            buildInputs = with pkgs; [
+              makeWrapper
+            ];
           }
           ''
             mkdir $out
@@ -112,7 +114,9 @@
             mkdir -p $out/home/git
             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 \
           '';
     };
 }