-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
68 lines (60 loc) · 1.91 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
{
description = "My system configuration";
inputs = {
# Where we get most of our software. Giant mono repo with recipes
# called derivations that say how to build software.
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
# Manages configs links things into your home directory
home-manager.url = "github:nix-community/home-manager/master";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# Controls system level software and settings including fonts
darwin.url = "github:lnl7/nix-darwin";
darwin.inputs.nixpkgs.follows = "nixpkgs";
fenix.url = "github:nix-community/fenix";
fenix.inputs.nixpkgs.follows = "nixpkgs";
get-flake.url = "github:ursi/get-flake";
# Neovim flake
nvim.url = "github:ethanniser/nvim.nix";
nvim.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {
self,
darwin,
nixpkgs,
home-manager,
fenix,
nvim,
...
} @ inputs: {
# Build darwin flake using:
# $ darwin-rebuild build --flake .#Ethans-MacBook-Pro
darwinConfigurations."Ethans-MacBook-Pro" = darwin.lib.darwinSystem {
system = "aarch64-darwin";
pkgs = import nixpkgs {
system = "aarch64-darwin";
overlays = [
nvim.overlays.default
fenix.overlays.default
];
};
modules = [
./modules/darwin.nix
./modules/homebrew.nix
home-manager.darwinModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.ethan.imports = [./modules/home-manager.nix];
extraSpecialArgs = {
inherit inputs;
};
};
system.configurationRevision = self.rev or self.dirtyRev or null;
}
];
};
# Expose the package set, including overlays, for convenience.
darwinPackages = self.darwinConfigurations."Ethans-MacBook-Pro".pkgs;
};
}