-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
53 lines (48 loc) · 1.94 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
description = "A nix flake supplying R and Python dev environments and project templates";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = {self, nixpkgs, flake-utils}:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in {
devShells =
let
r-base = (import ./r-base/flake.nix).outputs {inherit self; inherit nixpkgs;};
py-base = (import ./py-base/flake.nix).outputs {inherit self; inherit nixpkgs;};
r-spatial = (import ./r-spatial/flake.nix).outputs {inherit self; inherit nixpkgs;};
py-spatial = (import ./py-spatial/flake.nix).outputs {inherit self; inherit nixpkgs;};
quarto = (import ./quarto/flake.nix).outputs {inherit self; inherit nixpkgs;};
in {
r-base = r-base.devShells.${system}.default;
py-base = py-base.devShells.${system}.default;
r-spatial = r-spatial.devShells.${system}.default;
py-spatial = py-spatial.devShells.${system}.default;
quarto = quarto.devShells.${system}.default;
};
}) // {
templates = {
r-base = {
path = ./r-base;
description = "A Nix flake template for a r-base dev environment";
};
r-spatial = {
path = ./r-spatial;
description = "A Nix flake template for a r-spatial dev environment";
};
py-base = {
path = ./py-base;
description = "A Nix flake template for a py-base dev environment";
};
py-spatial = {
path = ./py-spatial;
description = "A Nix flake template for a py-spatial dev environment";
};
quarto = {
path = ./quarto;
description = "A Nix flake template for an dev environment containing quarto";
};
};
};
}