example refactor snowflake module system
This commit is contained in:
parent
0314109bc0
commit
3e29615db9
26 changed files with 1306 additions and 165 deletions
30
nix/snow/flake/modules/devShells.nix
Normal file
30
nix/snow/flake/modules/devShells.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, flake-parts-lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
mkOption
|
||||
types
|
||||
literalExpression
|
||||
;
|
||||
inherit (flake-parts-lib)
|
||||
mkTransposedPerSystemModule
|
||||
;
|
||||
in
|
||||
mkTransposedPerSystemModule {
|
||||
name = "devShells";
|
||||
option = mkOption {
|
||||
type = types.lazyAttrsOf types.package;
|
||||
default = { };
|
||||
description = ''
|
||||
An attribute set of packages to be used as shells.
|
||||
[`nix develop .#<name>`](https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-develop.html) will run `devShells.<name>`.
|
||||
'';
|
||||
example = literalExpression ''
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [ wget bat cargo ];
|
||||
};
|
||||
}
|
||||
'';
|
||||
};
|
||||
file = ./devShells.nix;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue