-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
79 lines (69 loc) · 2.13 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
72
73
74
75
76
77
78
79
{
description = "nunocf's flake";
inputs = {
# Where we get most of our software. Giant mono repo with recipes
# called derivations that say how to build certain software.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-24.11-darwin";
# Manages configs, links things to home directory
home-manager = {
url = "github:nix-community/home-manager";
# url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
# Controls system level software and settings including fonts
darwin = {
url = "github:/lnl7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew";
nunocf-nvim = {
url = "github:nunocf/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ {
nixpkgs,
darwin,
home-manager,
nix-homebrew,
nunocf-nvim,
...
}: let
username = "nunocf";
hostname = "Nunos-MacBook-Pro";
in {
darwinConfigurations."${hostname}" = darwin.lib.darwinSystem {
system = "aarch64-darwin";
pkgs = import nixpkgs {system = "aarch64-darwin";};
specialArgs = {inherit username;};
modules = [
./modules/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 = username;
# Automatically migrate existing Homebrew installations
autoMigrate = true;
};
}
home-manager.darwinModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {inherit nunocf-nvim username;};
users."${username}".imports = [
./modules/home-manager
];
};
}
];
};
};
}