mirror of
https://github.com/opdavies/build-configs.git
synced 2025-09-06 03:15:34 +01:00
feat(flake): generate nix.flake instead of Docker
...files if a `flake` key exists in a `build.yaml` file. Refs: OD-37
This commit is contained in:
parent
04160ad7de
commit
99ffb87446
3 changed files with 75 additions and 11 deletions
23
templates/common/flake.nix.twig
Normal file
23
templates/common/flake.nix.twig
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
inputs = {
|
||||
devshell.url = "github:numtide/devshell";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = inputs@{ flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
imports = [ inputs.devshell.flakeModule ];
|
||||
|
||||
systems = [ "x86_64-linux" ];
|
||||
|
||||
perSystem = { config, self', inputs', pkgs, system, ... }: {
|
||||
devshells.default = {
|
||||
packages = with pkgs; [
|
||||
{% for package in flake.devshell.packages %}
|
||||
"{{ package }}"
|
||||
{% endfor %}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue