Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
64 lines (62 loc) · 2.14 KB
/
Copy pathflake.nix
File metadata and controls
64 lines (62 loc) · 2.14 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
description = "pared: Apple Intelligence controls and model cleanup for macOS";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs =
inputs:
let
systems = [ "aarch64-darwin" ];
supportedSystems = [
"aarch64-darwin"
"aarch64-linux"
"x86_64-linux"
];
eachSystem = inputs.nixpkgs.lib.attrsets.genAttrs systems;
in
{
packages = inputs.nixpkgs.lib.attrsets.genAttrs supportedSystems (
system:
let
pkgs = inputs.nixpkgs.legacyPackages.${system};
docs = import ./docs {
inherit pkgs;
revision = inputs.self.rev or "master";
};
in
{
docs = docs.html;
docs-json = docs.json;
profile = pkgs.writeText "disable-apple-intelligence.mobileconfig" (
import ./nix/profile.nix { inherit (pkgs) lib; }
);
declarations = pkgs.writeText "pared-declarations.json" (
builtins.toJSON (import ./nix/declarations.nix { inherit (pkgs) lib; })
);
}
// inputs.nixpkgs.lib.attrsets.optionalAttrs (builtins.elem system systems) {
pared = pkgs.callPackage ./nix/package.nix { };
default = inputs.self.packages.${system}.pared;
}
);
apps = eachSystem (system: {
default = {
type = "app";
program = inputs.nixpkgs.lib.meta.getExe inputs.self.packages.${system}.pared;
};
});
devShells = eachSystem (system: {
default = inputs.nixpkgs.legacyPackages.${system}.mkShell {
inputsFrom = [ inputs.self.packages.${system}.pared ];
};
});
checks = inputs.nixpkgs.lib.attrsets.genAttrs supportedSystems (system: {
cleanup = import ./nix/tests/cleanup.nix {
pkgs = inputs.nixpkgs.legacyPackages.${system};
};
});
formatter = inputs.nixpkgs.lib.attrsets.genAttrs supportedSystems (
system: inputs.nixpkgs.legacyPackages.${system}.nixfmt
);
darwinModules.default = ./nix/modules/darwin.nix;
homeManagerModules.default = ./nix/modules/home-manager.nix;
};
}