-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathflake.nix
More file actions
43 lines (38 loc) · 1.01 KB
/
flake.nix
File metadata and controls
43 lines (38 loc) · 1.01 KB
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
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
outputs = {
self,
nixpkgs,
...
} @ inputs: let
forAllSystems = nixpkgs.lib.genAttrs ["x86_64-linux" "aarch64-linux"];
pkgsForEach = forAllSystems (system:
import nixpkgs {
localSystem.system = system;
overlays = [self.overlays.default];
});
in {
overlays = {
watt = final: _: {
watt = final.callPackage ./nix/package.nix {};
};
default = self.overlays.watt;
};
packages =
nixpkgs.lib.mapAttrs (system: pkgs: {
inherit (pkgs) watt;
default = self.packages.${system}.watt;
})
pkgsForEach;
devShells =
nixpkgs.lib.mapAttrs (system: pkgs: {
default = pkgs.callPackage ./nix/shell.nix {};
})
pkgsForEach;
nixosModules = {
watt = import ./nix/module.nix inputs;
default = self.nixosModules.watt;
};
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
};
}