summary refs log tree commit diff stats
path: root/user/modules
diff options
context:
space:
mode:
authorAlan Pearce2022-10-16 23:49:18 +0200
committerAlan Pearce2022-10-16 23:56:07 +0200
commit05dd85210e465caa44ef7254f2781b2d12ba2882 (patch)
tree85ccc720e339dd5ca8d7eb3ce6a3488c78675235 /user/modules
parent472dbbdbb246cf3d8ce3a5c3c6cefaa07b7589df (diff)
downloadnixfiles-05dd85210e465caa44ef7254f2781b2d12ba2882.tar.lz
nixfiles-05dd85210e465caa44ef7254f2781b2d12ba2882.tar.zst
nixfiles-05dd85210e465caa44ef7254f2781b2d12ba2882.zip
Reformat files with alejandra
Diffstat (limited to 'user/modules')
-rw-r--r--user/modules/eshell.nix15
-rw-r--r--user/modules/nvim-coc.nix15
-rw-r--r--user/modules/tabnine.nix47
3 files changed, 42 insertions, 35 deletions
diff --git a/user/modules/eshell.nix b/user/modules/eshell.nix
index eaa4a206..fd108af6 100644
--- a/user/modules/eshell.nix
+++ b/user/modules/eshell.nix
@@ -1,12 +1,15 @@
-{ config, lib, pkgs, ... }:
-
-with lib;
-
-let cfg = config.programs.emacs;
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}:
+with lib; let
+  cfg = config.programs.emacs;
 in {
   options.programs.emacs.eshell = {
     aliases = mkOption {
-      default = { };
+      default = {};
       type = types.attrsOf types.str;
       example = {
         ll = "ls -l $*";
diff --git a/user/modules/nvim-coc.nix b/user/modules/nvim-coc.nix
index 5aa462f0..bc8fbb19 100644
--- a/user/modules/nvim-coc.nix
+++ b/user/modules/nvim-coc.nix
@@ -1,12 +1,13 @@
-{ config,  lib, pkgs, ... }:
-
-with lib;
-
-let
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}:
+with lib; let
   inherit (pkgs) stdenv;
   cfg = config.programs.neovim.coc;
-in
-{
+in {
   options.programs.neovim.coc = {
     config = mkOption {
       type = types.attrs;
diff --git a/user/modules/tabnine.nix b/user/modules/tabnine.nix
index 16065ab1..261176dc 100644
--- a/user/modules/tabnine.nix
+++ b/user/modules/tabnine.nix
@@ -1,32 +1,35 @@
-{ config, lib, pkgs, ... }:
-
-with lib;
-
-let
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}:
+with lib; let
   inherit (pkgs) stdenv;
   cfg = config.programs.tabnine;
   lspConfigFile = config:
-  pkgs.runCommand "TabNine.toml"
-  {
-    buildInputs = [ pkgs.remarshal ];
-    preferLocalBuild = true;
-    allowSubstitutes = false;
-  }
-  ''
-    remarshal -if json -of toml \
-    < ${pkgs.writeText "config.json" (builtins.toJSON cfg.lspConfig)} \
-    | sed  -e 's/^\["\(.*\)"\]/[\1]/' \
-    > $out
-  '';
-in
-{
-
+    pkgs.runCommand "TabNine.toml"
+    {
+      buildInputs = [pkgs.remarshal];
+      preferLocalBuild = true;
+      allowSubstitutes = false;
+    }
+    ''
+      remarshal -if json -of toml \
+      < ${pkgs.writeText "config.json" (builtins.toJSON cfg.lspConfig)} \
+      | sed  -e 's/^\["\(.*\)"\]/[\1]/' \
+      > $out
+    '';
+in {
   options.programs.tabnine = {
     enable = mkEnableOption "TabNine, Smart Compose for code.";
 
     configDir = mkOption {
       type = types.str;
-      default = if stdenv.isDarwin then "Library/Preferences/TabNine" else "${config.xdg.configHome}/TabNine";
+      default =
+        if stdenv.isDarwin
+        then "Library/Preferences/TabNine"
+        else "${config.xdg.configHome}/TabNine";
       description = ''
         Location of TabNine configuration directory relative to \$HOME
       '';
@@ -34,7 +37,7 @@ in
 
     config = mkOption {
       type = types.attrs;
-      default = { };
+      default = {};
       description = ''
         TabNine configuration written to
         <filename>\${configDir}/tabnine_config.json</filename>