-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
55 lines (44 loc) · 1.65 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
{
description = "Nix for pastc";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nix-darwin.url = "github:LnL7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew";
};
outputs = inputs@{ self, nix-darwin, nixpkgs, nix-homebrew }:
{
darwinConfigurations."pastc-darwin" = nix-darwin.lib.darwinSystem {
system = "aarch64-darwin";
specialArgs = { inherit inputs; };
modules = [
{
# Set Git commit hash for darwin-version.
system.configurationRevision = self.rev or self.dirtyRev or null;
# Auto upgrade nix package and the daemon service
services.nix-daemon.enable = true;
# Necessary for using flakes on this system
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Used for backwards compatibility
system.stateVersion = 5;
# The platform the configuration will be used on
nixpkgs.hostPlatform = "aarch64-darwin";
}
nix-homebrew.darwinModules.nix-homebrew
{
nix-homebrew = {
# Install Homebrew under the default prefix
enable = true;
# Apple Silicon Only: Also install Homebrew under the default Intel prefix for Rosetta 2
enableRosetta = true;
# User owning the Homebrew prefix
user = "acacia";
};
}
./system.nix
./apps.nix
];
};
darwinPackages = self.darwinConfigurations."pastc-darwin".pkgs;
};
}