feat: added devshell default input template for nix projects
This commit is contained in:
parent
1587142353
commit
ad876c75f0
2 changed files with 44 additions and 0 deletions
|
|
@ -59,6 +59,7 @@
|
|||
|
||||
alias = {
|
||||
shells.default = "yumeami";
|
||||
templates.default = "devshell";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
43
templates/devshell/flake.nix
Normal file
43
templates/devshell/flake.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.05";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||
};
|
||||
outputs = {
|
||||
flake-utils,
|
||||
nixpkgs,
|
||||
treefmt-nix,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system: let
|
||||
pkgs = import nixpkgs {inherit system;};
|
||||
|
||||
treefmtConfig = {...}: {
|
||||
projectRootFile = "flake.nix";
|
||||
programs = {
|
||||
alejandra.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
treefmtEval = treefmt-nix.lib.evalModule pkgs (treefmtConfig {inherit pkgs;});
|
||||
in {
|
||||
formatter = treefmtEval.config.build.wrapper;
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
];
|
||||
|
||||
packages = with pkgs; [
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue