-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
70 lines (61 loc) · 1.92 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
{
description = "Just a bunch of packages";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-update-soopy = {
url = "github:soopyc/nix-update";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs =
{
self,
nixpkgs,
treefmt-nix,
nix-update-soopy,
...
}@inputs:
let
inherit (nixpkgs) lib;
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
];
forAllSystems = fn: nixpkgs.lib.genAttrs systems (system: fn nixpkgs.legacyPackages.${system});
treefmtEval = forAllSystems (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
in
{
packages = forAllSystems (pkgs: import ./packages/all-packages.nix inputs { } pkgs);
overlays.default = import ./packages/all-packages.nix inputs;
formatter = forAllSystems (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
checks = forAllSystems (pkgs: {
formatting = treefmtEval.${pkgs.system}.config.build.check self;
});
devShells = forAllSystems (pkgs: {
default = pkgs.mkShellNoCC {
packages = [ nix-update-soopy.packages.${pkgs.system}.default ];
};
});
nixosModules = {
fixups = lib.modules.importApply ./modules/fixups { };
vmauth = lib.modules.importApply ./modules/vmauth { };
arrpc = lib.modules.importApply ./modules/arrpc { };
bsky-pds = lib.modules.importApply ./modules/bsky-pds { };
anubis = lib.modules.importApply ./modules/anubis { inherit self; };
};
nixosTests = forAllSystems (pkgs: {
anubis = pkgs.callPackage ./tests/anubis.nix { } {
module = self.nixosModules.anubis;
};
});
};
}