about summary refs log tree commit diff
path: root/modules/common
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/common/common/home-manager.nix4
-rw-r--r--modules/common/emacs/default.nix3
-rw-r--r--modules/common/vscode.nix88
3 files changed, 81 insertions, 14 deletions
diff --git a/modules/common/common/home-manager.nix b/modules/common/common/home-manager.nix
index 240cd93..7fa21f8 100644
--- a/modules/common/common/home-manager.nix
+++ b/modules/common/common/home-manager.nix
@@ -1,4 +1,5 @@
 {
+  config,
   lib,
   localUsername ? lib.my.username,
   ...
@@ -10,8 +11,7 @@ with lib; {
 
   hm = {
     news.display = "silent";
-    # FIXME This is temporary until home-manager expands the option enum.
-    home.stateVersion = "23.05";
+    home = {inherit (config.system) stateVersion;};
   };
 
   home-manager = {
diff --git a/modules/common/emacs/default.nix b/modules/common/emacs/default.nix
index 5499d48..d9a5922 100644
--- a/modules/common/emacs/default.nix
+++ b/modules/common/emacs/default.nix
@@ -113,7 +113,8 @@ in {
                     shfmt # :lang sh :editor format
                     sqlite # :lang (org +roam2) :tools lookup
                     texlab # lang (tex +lsp)
-                    texlive.combined.scheme-full # :lang org tex
+                    # FIXME https://github.com/NixOS/nixpkgs/issues/235434
+                    # texlive.combined.scheme-full # :lang org tex
                     unzip # :tools debugger
                     wordnet # :tools (lookup +dictionary +offline)
                     yaml-language-server # :lang (yaml +lsp)
diff --git a/modules/common/vscode.nix b/modules/common/vscode.nix
index ee3e18c..0498fea 100644
--- a/modules/common/vscode.nix
+++ b/modules/common/vscode.nix
@@ -34,7 +34,6 @@ in {
 
       extensions = with pkgs.open-vsx;
         [
-          arrterian.nix-env-selector
           editorconfig.editorconfig
           efoerster.texlab
           github.vscode-pull-request-github
@@ -50,10 +49,7 @@ in {
           mkhl.direnv
           ms-kubernetes-tools.vscode-kubernetes-tools
           ms-python.python
-          ms-vscode.cmake-tools
-          pinage404.nix-extension-pack
           redhat.ansible
-          redhat.java
           redhat.vscode-xml
           redhat.vscode-yaml
           rust-lang.rust
@@ -61,7 +57,7 @@ in {
           streetsidesoftware.code-spell-checker-british-english
           streetsidesoftware.code-spell-checker-russian
           streetsidesoftware.code-spell-checker-scientific-terms
-          sumneko.lua
+          tamasfe.even-better-toml
           vscode-org-mode.org-mode
           ziglang.vscode-zig
         ]
@@ -129,11 +125,7 @@ in {
         };
 
         terminal = {
-          external.linuxExec =
-            if alacritty.enable
-            then "${pkgs.alacritty}/bin/alacritty"
-            else "${pkgs.xterm}/bin/xterm";
-
+          external.linuxExec = "${pkgs.alacritty}/bin/alacritty";
           integrated = {
             inherit fontFamily fontSize;
             enableBell = true;
@@ -152,7 +144,76 @@ in {
 
         security.workspace.trust.enabled = false;
 
-        git.allowForcePush = true;
+        # Extensions.
+
+        ansible = {
+          ansible = {
+            useFullyQualifiedCollectionNames = true;
+            reuseTerminal = true;
+          };
+          validation.lint.path = "${pkgs.ansible-lint}/bin/ansible-lint";
+        };
+
+        bashIde.shellcheckPath = "${pkgs.shellcheck}/bin/shellcheck";
+
+        cSpell.language = "en-GB,ru";
+
+        magit = {
+          forge-enabled = true;
+          git-path = "${config.hm.programs.git.package}/bin/git";
+        };
+
+        github = {
+          branchProtection = true;
+          gitProtocol = "ssh";
+        };
+
+        terraform = {
+          languageServer.path = "${pkgs.terraform-ls}/bin/terraform-ls";
+          languageServer.terraform.path = "${pkgs.terraform}/bin/terraform";
+        };
+
+        haskell = {
+          formattingProvider = "ormolu";
+          serverExecutablePath = "${pkgs.haskell-language-server}/bin/haskell-language-server";
+        };
+
+        nix = {
+          enableLanguageServer = true;
+          serverPath = "${pkgs.rnix-lsp}/bin/rnix-lsp";
+        };
+
+        python = with pkgs.python311Packages; {
+          experiments.optOutFrom = ["All"];
+          pipenvPath = "${pkgs.pipenv}/bin/pipenv";
+          poetryPath = "${pkgs.poetry}/bin/poetry";
+          formatting = {
+            provider = "black";
+            autopep8Path = "${autopep8}/bin/autopep8";
+            blackPath = "${black}/bin/black";
+            yapfPath = "${yapf}/bin/yapf";
+          };
+          linting = {
+            enabled = true;
+            banditPath = "${bandit}/bin/bandit";
+            flake8Path = "${flake8}/bin/flake8";
+            mypyPath = "${mypy}/bin/mypy";
+            pycodestylePath = "${pycodestyle}/bin/pycodestyle";
+            pydocstylePath = "${pydocstyle}/bin/pydocstyle";
+            pylamaPath = "${pylama}/bin/pylama";
+            pylintPath = "${pylint}/bin/pylint";
+          };
+          testing = {
+            pytestPath = "${pytest}/bin/pytest";
+          };
+        };
+
+        rust-client = {
+          disableRustup = true;
+          rustupPath = "${pkgs.rustup}/bin/rustup";
+          rlsPath = "${pkgs.rustup}/bin/rls";
+          rustfmt_path = "${pkgs.rustfmt}/bin/rustfmt";
+        };
 
         vim = mkIf cfg.vim.enable rec {
           easymotion = true;
@@ -164,6 +225,11 @@ in {
           useSystemClipboard = true;
         };
 
+        zig.zls = {
+          checkForUpdate = false;
+          path = "${pkgs.zls}/bin/zls";
+        };
+
         redhat.telemetry.enabled = false;
       };
     };

Consider giving Nix/NixOS a try! <3