Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
118 lines (111 loc) · 3.36 KB
/
Copy pathflake.nix
File metadata and controls
118 lines (111 loc) · 3.36 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
{
description = "bzm nixos and nix-darwin configurations";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
systems.url = "github:nix-systems/default";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
nix-darwin = {
url = "github:nix-darwin/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
brew-nix = {
url = "github:BatteredBunny/brew-nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nix-darwin.follows = "nix-darwin";
inputs.brew-api.follows = "brew-api";
};
brew-api = {
url = "github:BatteredBunny/brew-api";
flake = false;
};
nixvim = {
url = "github:nix-community/nixvim";
inputs.flake-parts.follows = "flake-parts";
inputs.systems.follows = "systems";
};
llm-agents = {
url = "github:numtide/llm-agents.nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-parts.follows = "flake-parts";
inputs.systems.follows = "systems";
};
};
outputs =
{
nixpkgs,
nix-darwin,
home-manager,
...
}@inputs:
let
system = "aarch64-darwin";
in
import ./mkflake.nix {
inherit inputs;
systems = [ system ];
imports = [
{
darwinConfigurations = {
amartha = nix-darwin.lib.darwinSystem {
specialArgs = { inherit inputs system; };
modules = [ ./hosts/macbook ];
};
quicksilver = nix-darwin.lib.darwinSystem {
specialArgs = { inherit inputs system; };
modules = [ ./hosts/macbook ];
};
};
homeConfigurations = {
bzm = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${system};
extraSpecialArgs = { inherit inputs; };
modules = [ ./users/bzm ];
};
billyzaelanimalik = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${system};
extraSpecialArgs = { inherit inputs; };
modules = [ ./users/billyzaelanimalik ];
};
};
}
{
perSystem =
{ pkgs, ... }:
{
# See: https://treefmt.com/latest/getting-started/configure/#config-file
treefmt = {
formatter.oxfmt = {
command = "${pkgs.oxfmt}/bin/oxfmt";
includes = [
"*.md"
"*.json"
"*.toml"
"*yaml"
];
};
formatter.actionlint = {
command = "${pkgs.actionlint}/bin/actionlint";
includes = [ ".github/workflows/*.yaml" ];
};
formatter.shfmt = {
command = "${pkgs.shfmt}/bin/shfmt";
options = [ "--write" ];
includes = [ "*.sh" ];
};
formatter.nixfmt = {
command = "${pkgs.nixfmt}/bin/nixfmt";
includes = [ "*.nix" ];
};
};
};
}
];
};
}