From 902b296299cd8e948c6f301434bb7c7d4400b7d0 Mon Sep 17 00:00:00 2001 From: Pedro Rey Anca Date: Thu, 30 Oct 2025 19:10:44 +0100 Subject: [PATCH 1/2] Commit some reformatted files --- flake.nix | 65 +++++++++++++++++++++++++----------------------- modules/base.nix | 3 ++- 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/flake.nix b/flake.nix index 523ea72..b166960 100644 --- a/flake.nix +++ b/flake.nix @@ -28,36 +28,39 @@ }; }; - outputs = { - self, - clan-core, - nixpkgs, - ... - } @ inputs: let - # Usage see: https://docs.clan.lol - clan = clan-core.lib.clan { - inherit self; - imports = [./clan.nix]; - specialArgs = {inherit inputs;}; - }; - in { - inherit (clan.config) nixosConfigurations nixosModules clanInternals; - # Add the Clan cli tool to the dev shell. - # Use "nix develop" to enter the dev shell. - devShells = - nixpkgs.lib.genAttrs - [ - "x86_64-linux" - "aarch64-linux" - "aarch64-darwin" - "x86_64-darwin" - ] - (system: { - default = clan-core.inputs.nixpkgs.legacyPackages.${system}.mkShell { - packages = [clan-core.packages.${system}.clan-cli]; - }; - }); + outputs = + { + self, + clan-core, + nixpkgs, + ... + }@inputs: + let + # Usage see: https://docs.clan.lol + clan = clan-core.lib.clan { + inherit self; + imports = [ ./clan.nix ]; + specialArgs = { inherit inputs; }; + }; + in + { + inherit (clan.config) nixosConfigurations nixosModules clanInternals; + # Add the Clan cli tool to the dev shell. + # Use "nix develop" to enter the dev shell. + devShells = + nixpkgs.lib.genAttrs + [ + "x86_64-linux" + "aarch64-linux" + "aarch64-darwin" + "x86_64-darwin" + ] + (system: { + default = clan-core.inputs.nixpkgs.legacyPackages.${system}.mkShell { + packages = [ clan-core.packages.${system}.clan-cli ]; + }; + }); - clan = clan.config; - }; + clan = clan.config; + }; } diff --git a/modules/base.nix b/modules/base.nix index 8eb30f1..b4e454d 100644 --- a/modules/base.nix +++ b/modules/base.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ # Must-have packages environment.systemPackages = with pkgs; [ vim From 715f3d6f936b47c927fc3bc00b03b22981d0882b Mon Sep 17 00:00:00 2001 From: Pedro Rey Anca Date: Thu, 30 Oct 2025 19:11:35 +0100 Subject: [PATCH 2/2] Add JSON config for Helix --- users/pedro/home-configuration/helix.nix | 34 ++++++++++++++++++------ 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/users/pedro/home-configuration/helix.nix b/users/pedro/home-configuration/helix.nix index d0617bc..6a17cea 100644 --- a/users/pedro/home-configuration/helix.nix +++ b/users/pedro/home-configuration/helix.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ programs.helix = { enable = true; defaultEditor = true; @@ -6,32 +7,49 @@ language-server = { pyright = { command = "${pkgs.pyright}/bin/pyright-langserver"; - args = ["--stdio"]; - config = {}; + args = [ "--stdio" ]; + config = { }; }; - nil = {command = "${pkgs.nil}/bin/nil";}; + nil = { + command = "${pkgs.nil}/bin/nil"; + }; + + vscode-json-language-server.command = "${pkgs.nodePackages.vscode-json-languageserver}/bin/vscode-json-languageserver"; }; language = [ { name = "nix"; - language-servers = ["nil"]; + language-servers = [ "nil" ]; auto-format = true; formatter.command = "${pkgs.nixfmt-rfc-style}/bin/nixfmt"; } { name = "python"; - language-servers = ["pyright"]; + language-servers = [ "pyright" ]; auto-format = true; formatter = { command = "${pkgs.black}/bin/black"; - args = ["--quiet" "-"]; + args = [ + "--quiet" + "-" + ]; + }; + } + { + name = "json"; + formatter = { + command = "${pkgs.nodePackages.prettier}/bin/prettier"; + args = [ + "--parser" + "json" + ]; }; } ]; }; - settings = {}; + settings = { }; }; }