diff options
| author | seth <[email protected]> | 2024-06-30 09:31:12 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2024-06-30 09:31:12 -0400 |
| commit | e00e18b05f519c7f82031477d5759665abd890d1 (patch) | |
| tree | 33d6b5a7f547bdb69a62391be00529df705e5864 /flake.nix | |
| parent | 244dd7f5a4a7d39c0945f9720a68ea7704169375 (diff) | |
alejandra -> nixfmt-rfc-style
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 148 |
1 files changed, 78 insertions, 70 deletions
@@ -6,82 +6,90 @@ flake-checks.url = "github:getchoo/flake-checks"; }; - outputs = { - self, - nixpkgs, - flake-checks, - }: let - systems = [ - "x86_64-linux" - "aarch64-linux" - "x86_64-darwin" - "aarch64-darwin" - ]; + outputs = + { + self, + nixpkgs, + flake-checks, + }: + let + systems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; - forAllSystems = fn: - nixpkgs.lib.genAttrs systems (system: - fn { - inherit system; - pkgs = nixpkgs.legacyPackages.${system}; - }); - in { - checks = forAllSystems ({pkgs, ...}: let - flake-checks' = flake-checks.lib.mkChecks { - root = ./.; - inherit pkgs; - }; - in { - inherit - (flake-checks') - actionlint - alejandra - selene - statix - stylua - ; - }); + forAllSystems = + fn: + nixpkgs.lib.genAttrs systems ( + system: + fn { + inherit system; + pkgs = nixpkgs.legacyPackages.${system}; + } + ); + in + { + checks = forAllSystems ( + { pkgs, ... }: + let + flake-checks' = flake-checks.lib.mkChecks { + root = ./.; + inherit pkgs; + }; + in + { + inherit (flake-checks') + actionlint + alejandra + selene + statix + stylua + ; + } + ); - devShells = forAllSystems ({ - pkgs, - system, - }: { - default = pkgs.mkShellNoCC { - packages = [ - pkgs.actionlint + devShells = forAllSystems ( + { pkgs, system }: + { + default = pkgs.mkShellNoCC { + packages = [ + pkgs.actionlint - # lua - pkgs.lua-language-server - pkgs.selene - pkgs.stylua + # lua + pkgs.lua-language-server + pkgs.selene + pkgs.stylua - # nix - self.formatter.${system} - pkgs.deadnix - pkgs.nil - pkgs.statix - ]; - }; - }); + # nix + self.formatter.${system} + pkgs.deadnix + pkgs.nil + pkgs.statix + ]; + }; + } + ); - formatter = forAllSystems ({pkgs, ...}: pkgs.alejandra); + formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-rfc-style); - packages = forAllSystems ({ - pkgs, - system, - }: let - packages' = self.packages.${system}; - version = self.shortRev or self.dirtyShortRev or "unknown"; - in { - getchvim = pkgs.callPackage ./neovim.nix { - inherit version; - inherit (packages') vimPlugins-getchoo-nvim; - }; + packages = forAllSystems ( + { pkgs, system }: + let + packages' = self.packages.${system}; + version = self.shortRev or self.dirtyShortRev or "unknown"; + in + { + getchvim = pkgs.callPackage ./neovim.nix { + inherit version; + inherit (packages') vimPlugins-getchoo-nvim; + }; - vimPlugins-getchoo-nvim = pkgs.callPackage ./config { - inherit version; - }; + vimPlugins-getchoo-nvim = pkgs.callPackage ./config { inherit version; }; - default = packages'.getchvim; - }); - }; + default = packages'.getchvim; + } + ); + }; } |
