-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathflake.nix
59 lines (52 loc) · 1.6 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
54
55
56
57
58
59
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
# <https://github.com/nix-community/poetry2nix>
poetry2nix = {
url = "github:nix-community/poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# <https://github.com/nix-systems/nix-systems>
systems.url = "github:nix-systems/default-linux";
# <https://github.com/edolstra/flake-compat>
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = {
self,
systems,
nixpkgs,
...
} @ inputs: let
inherit (inputs.poetry2nix.lib) mkPoetry2Nix;
eachSystem = nixpkgs.lib.genAttrs (import systems);
pkgsFor = eachSystem (system: import nixpkgs {localSystem = system;});
in {
packages = eachSystem (system: let
inherit (mkPoetry2Nix {pkgs = pkgsFor.${system};}) mkPoetryApplication;
in {
default = self.packages.${system}.pyprland;
pyprland = mkPoetryApplication {
projectDir = nixpkgs.lib.cleanSource ./.;
checkGroups = [];
};
});
devShells = eachSystem (system: let
inherit (mkPoetry2Nix {pkgs = pkgsFor.${system};}) mkPoetryEnv;
in {
default = self.devShells.${system}.pyprland;
pyprland = pkgsFor.${system}.mkShellNoCC {
packages = with pkgsFor.${system}; [
(mkPoetryEnv {projectDir = ./.;})
poetry
];
};
});
};
nixConfig = {
extra-substituters = ["https://hyprland-community.cachix.org"];
extra-trusted-public-keys = ["hyprland-community.cachix.org-1:5dTHY+TjAJjnQs23X+vwMQG4va7j+zmvkTKoYuSXnmE="];
};
}