-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
76 lines (66 loc) · 1.76 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
azure-cli-nixpkgs = {
url = "github:NixOS/nixpkgs?ref=92ceff55c9ebc5943853b83287f49fd73a909abd";
};
ffmpeg-nixpkgs = {
url = "github:NixOS/nixpkgs?ref=ea1799ea8c3bb5bcbdc016986288836a04fc6294";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
systems,
azure-cli-nixpkgs,
ffmpeg-nixpkgs,
treefmt-nix,
home-manager,
...
}:
let
system = "x86_64-linux";
eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});
treefmtEval = eachSystem (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
pkgs = import nixpkgs {
system = system;
config.allowUnfree = true;
};
pinned-pkgs = {
azure-cli = import azure-cli-nixpkgs {
inherit system;
config.allowUnfree = true;
};
ffmpeg = import ffmpeg-nixpkgs {
inherit system;
config.allowUnfree = true;
};
};
in
{
formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
checks = eachSystem (pkgs: {
formatting = treefmtEval.${pkgs.system}.config.build.check self;
});
homeConfigurations = {
myHome = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./home.nix
];
extraSpecialArgs = {
inherit pinned-pkgs;
};
};
};
};
}