forked from Defelo/sandkasten
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
44 lines (43 loc) · 1.19 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-24.05";
nixpkgs-old.url = "github:NixOS/nixpkgs/release-22.11";
nixpkgs-master.url = "github:NixOS/nixpkgs";
fenix.url = "github:nix-community/fenix";
};
outputs = {
self,
nixpkgs,
fenix,
...
} @ inputs: let
defaultSystems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
eachDefaultSystem = f:
builtins.listToAttrs (map (system: {
name = system;
value = f (import nixpkgs {inherit system;});
})
defaultSystems);
lib = import ./nix/lib.nix;
in {
packages = eachDefaultSystem (pkgs: {
default = self.packages.${pkgs.system}.sandkasten;
sandkasten = pkgs.callPackage ./nix/sandkasten.nix {inherit fenix;};
packages = import ./nix/packages {
inherit inputs lib;
inherit (pkgs) system;
};
time = pkgs.callPackage ./nix/time {};
});
nixosModules.sandkasten = import ./nix/nixos/module.nix {
inherit self lib;
};
devShells = eachDefaultSystem (pkgs: import ./nix/dev/shell.nix {inherit self pkgs lib;});
templates.vm.path = ./nix/nixos/vm;
};
}