-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
71 lines (61 loc) · 1.48 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
{
description = "My home configuration";
inputs = {
darwin = {
url = "github:lnl7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs-darwin";
};
home-manager = {
url = "https://flakehub.com/f/nix-community/home-manager/0.2405.3571.tar.gz";
inputs.nixpkgs.follows = "nixpkgs-darwin";
};
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-24.05-darwin";
};
outputs = {
self,
darwin,
home-manager,
nixpkgs,
...
}: let
system = "aarch64-darwin";
pkgs = nixpkgs.legacyPackages.${system};
darwinConfiguration = profile:
darwin.lib.darwinSystem {
inherit system;
specialArgs = {
inherit profile;
};
modules = [
./nix
./system
./homebrew
home-manager.darwinModules.home-manager
{
home-manager = {
extraSpecialArgs = {
inherit profile;
};
useGlobalPkgs = true;
useUserPackages = true;
users.${profile.username} = import ./home;
};
}
];
};
in {
darwinConfigurations = {
personal = darwinConfiguration {
name = "Andrew Garner";
email = "[email protected]";
username = "andrewgarner";
};
};
devShells.${system}.default = pkgs.mkShell {
packages = with pkgs; [
lefthook
];
};
formatter.${system} = pkgs.alejandra;
};
}