summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseth <[email protected]>2024-06-30 09:31:12 -0400
committerseth <[email protected]>2024-06-30 09:31:12 -0400
commite00e18b05f519c7f82031477d5759665abd890d1 (patch)
tree33d6b5a7f547bdb69a62391be00529df705e5864
parent244dd7f5a4a7d39c0945f9720a68ea7704169375 (diff)
alejandra -> nixfmt-rfc-style
-rw-r--r--.github/workflows/publish.yaml15
-rw-r--r--config/plugin/lsp.lua2
-rw-r--r--flake.nix148
-rw-r--r--neovim.nix38
4 files changed, 107 insertions, 96 deletions
diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml
index 39dc1a5..caee322 100644
--- a/.github/workflows/publish.yaml
+++ b/.github/workflows/publish.yaml
@@ -25,13 +25,14 @@ jobs:
visibility: "public"
rolling: true
- flakestry:
- name: Flakestry
+ # TODO: re-enable when flakestry supports rolling releases
+ # flakestry:
+ # name: Flakestry
- runs-on: ubuntu-latest
+ # runs-on: ubuntu-latest
- permissions:
- id-token: write
+ # permissions:
+ # id-token: write
- steps:
- - uses: flakestry/flakestry-publish@main
+ # steps:
+ # - uses: flakestry/flakestry-publish@main
diff --git a/config/plugin/lsp.lua b/config/plugin/lsp.lua
index 0006b6a..356add3 100644
--- a/config/plugin/lsp.lua
+++ b/config/plugin/lsp.lua
@@ -49,7 +49,7 @@ local lsp_servers = {
extraOptions = {
settings = {
["nil"] = {
- formatting = { command = { "alejandra" } },
+ formatting = { command = { "nixfmt" } },
},
},
},
diff --git a/flake.nix b/flake.nix
index 168c9a6..71f63ed 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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;
+ }
+ );
+ };
}
diff --git a/neovim.nix b/neovim.nix
index 8819d3f..ef721a8 100644
--- a/neovim.nix
+++ b/neovim.nix
@@ -5,18 +5,19 @@
wrapNeovimUnstable,
neovim-unwrapped,
actionlint,
- alejandra,
beautysh,
ripgrep,
efm-langserver,
nil,
+ nixfmt-rfc-style,
nodePackages,
shellcheck,
statix,
typos-lsp,
vimPlugins-getchoo-nvim,
...
-}: let
+}:
+let
plugins = with vimPlugins; [
bufferline-nvim
# dependent on >
@@ -75,23 +76,24 @@
nodePackages.bash-language-server
shellcheck
nil
- alejandra
+ nixfmt-rfc-style
typos-lsp
];
- neovimConfig = neovimUtils.makeNeovimConfig {
- plugins = plugins ++ [vimPlugins-getchoo-nvim];
- };
+ neovimConfig = neovimUtils.makeNeovimConfig { plugins = plugins ++ [ vimPlugins-getchoo-nvim ]; };
in
- wrapNeovimUnstable neovim-unwrapped (
- neovimConfig
- // {
- luaRcContent = ''
- require("getchoo")
- '';
-
- wrapperArgs =
- neovimConfig.wrapperArgs
- ++ ["--suffix" "PATH" ":" "${lib.makeBinPath extraPackages}"];
- }
- )
+wrapNeovimUnstable neovim-unwrapped (
+ neovimConfig
+ // {
+ luaRcContent = ''
+ require("getchoo")
+ '';
+
+ wrapperArgs = neovimConfig.wrapperArgs ++ [
+ "--suffix"
+ "PATH"
+ ":"
+ "${lib.makeBinPath extraPackages}"
+ ];
+ }
+)