summary refs log tree commit diff stats
path: root/user/settings/development/base.nix
diff options
context:
space:
mode:
Diffstat (limited to 'user/settings/development/base.nix')
-rw-r--r--user/settings/development/base.nix59
1 files changed, 46 insertions, 13 deletions
diff --git a/user/settings/development/base.nix b/user/settings/development/base.nix
index dcbf370f..89006558 100644
--- a/user/settings/development/base.nix
+++ b/user/settings/development/base.nix
@@ -9,13 +9,11 @@
     [
       shellcheck
       shfmt
-      python3Packages.yamllint
       nodePackages.dockerfile-language-server-nodejs
       nodePackages.vscode-json-languageserver
       nodePackages.yaml-language-server
       lua-language-server
-      rubyPackages.solargraph
-      multimarkdown
+      taplo # toml
 
       license-cli
       just
@@ -49,6 +47,29 @@
     LIMA_INSTANCE = "nixos";
   };
 
+  editorconfig = {
+    enable = true;
+    settings = {
+      "*" = {
+        charset = "utf-8";
+        end_of_line = "lf";
+        trim_trailing_whitespace = true;
+        insert_final_newline = true;
+        indent_style = "space";
+        indent_size = 2;
+        tab_width = 2;
+      };
+      justfile = {
+        indent_style = "tab";
+        tab_width = 4;
+      };
+      Makefile = {
+        indent_style = "tab";
+        tab_width = 4;
+      };
+    };
+  };
+
   home.shellAliases = {
     er = "direnv reload";
     ea = "direnv allow";
@@ -60,15 +81,27 @@
     nix-direnv = {
       enable = true;
     };
+    config = {
+      global = {
+        disable_stdin = true;
+        strict_env = true;
+        hide_env_diff = true;
+      };
+      whitelist = {
+        prefix = with config.home; [
+          "${homeDirectory}/projects/alanpearce.eu"
+        ];
+      };
+    };
+    stdlib = ''
+      declare -A direnv_layout_dirs
+      direnv_layout_dir() {
+        echo "''${direnv_layout_dirs[$PWD]:=$(
+          local hash="$(${pkgs.coreutils}/bin/sha256sum - <<<"''${PWD}" | cut -c-7)"
+      		local path="''${PWD//[^a-zA-Z0-9]/-}"
+          echo "${config.xdg.cacheHome}/direnv/layouts/''${hash}''${path}"
+        )}"
+      }
+    '';
   };
-  xdg.configFile."direnv/direnvrc".text = ''
-    declare -A direnv_layout_dirs
-    direnv_layout_dir() {
-      echo "''${direnv_layout_dirs[$PWD]:=$(
-        local hash="$(${pkgs.coreutils}/bin/sha256sum - <<<"''${PWD}" | cut -c-7)"
-    		local path="''${PWD//[^a-zA-Z0-9]/-}"
-        echo "${config.xdg.cacheHome}/direnv/layouts/''${hash}''${path}"
-      )}"
-    }
-  '';
 }