Format with alejandra

This commit is contained in:
Sam W 2022-06-19 15:20:35 +01:00
parent c5efaa6024
commit 06ffebaddc
4 changed files with 78 additions and 56 deletions

View File

@ -4,7 +4,12 @@
utils.url = "github:numtide/flake-utils";
devshell.url = "github:numtide/devshell";
};
outputs = { self, nixpkgs, utils, devshell }:
outputs = {
self,
nixpkgs,
utils,
devshell,
}:
utils.lib.eachDefaultSystem (system: {
devShells.default = let
pkgs = import nixpkgs {
@ -12,6 +17,7 @@
overlays = [devshell.overlay];
};
in pkgs.devshell.mkShell { packages = with pkgs; [ ]; };
in
pkgs.devshell.mkShell {packages = with pkgs; [];};
});
}

View File

@ -2,7 +2,11 @@
description = "Samw's Nix flake templates";
inputs = {utils.url = "github:numtide/flake-utils";};
outputs = { self, utils, nixpkgs }:
outputs = {
self,
utils,
nixpkgs,
}:
{
templates = {
rust = {
@ -18,7 +22,8 @@
description = "A basic devshell setup";
};
};
} // utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
in { formatter = pkgs.nixfmt; });
}
// utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
in {formatter = pkgs.alejandra;});
}

View File

@ -7,9 +7,13 @@
inputs.flake-utils.follows = "flake-utils";
};
outputs = { self, nixpkgs, utils, devshell }:
utils.lib.eachDefaultSystem (system:
let
outputs = {
self,
nixpkgs,
utils,
devshell,
}:
utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [devshell.overlay];

View File

@ -8,9 +8,15 @@
rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs = { self, nixpkgs, utils, naersk, devshell, rust-overlay }:
utils.lib.eachDefaultSystem (system:
let
outputs = {
self,
nixpkgs,
utils,
naersk,
devshell,
rust-overlay,
}:
utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [(import rust-overlay)];
@ -35,7 +41,8 @@
inherit system;
overlays = [devshell.overlay];
};
in pkgs.devshell.mkShell {
in
pkgs.devshell.mkShell {
packages = with pkgs; [(rust.override {extensions = ["rls"];})];
};
});