-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
95 lines (86 loc) · 2.53 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# nix run nix-darwin -- switch --flake "path:$(readlink -f ~/.config/nixpkgs)"
# To update nix-darwin system configurations after changing, run in the flake dir:
# darwin-rebuild switch --flake path:~/.config/nixpkgs
{
description = "Default user environment packages";
inputs = {
# Primary nixpkgs source for the system
nixpkgs.url = "github:NixOs/nixpkgs/nixpkgs-unstable";
# Master nixpkgs source for the system to use for
# awscli2 because it fails to build on nixpkgs-unstable
nixpkgs-master.url = "github:NixOs/nixpkgs/master";
# NixOS like configuration for macOS
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
# Cross-platform user specific configuration for home directories
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# Manages Homebrew on macOS
nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew";
# Declarative Homebrew Tap management
homebrew-core = {
url = "github:homebrew/homebrew-core";
flake = false;
};
homebrew-cask = {
url = "github:homebrew/homebrew-cask";
flake = false;
};
homebrew-bundle = {
url = "github:homebrew/homebrew-bundle";
flake = false;
};
nickkadutskyi-homebrew-cask = {
url = "github:nickkadutskyi/homebrew-cask";
flake = false;
};
nikitabobko-homebrew-tap = {
url = "github:nikitabobko/homebrew-tap";
flake = false;
};
# Sets custom icons on macOS
darwin-custom-icons.url = "github:ryanccn/nix-darwin-custom-icons";
# Encrypts secrets
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Nightly version of Neovim
neovim-nightly-overlay = {
url = "github:nix-community/neovim-nightly-overlay";
};
};
outputs =
{
self,
nixpkgs,
nixpkgs-master,
nix-darwin,
home-manager,
nix-homebrew,
darwin-custom-icons,
sops-nix,
...
}@inputs:
let
mkSystem = import ./lib/mksystem.nix {
inherit nixpkgs nixpkgs-master inputs;
};
in
{
darwinConfigurations.Nicks-MacBook-Air = mkSystem "Nicks-MacBook-Air" {
system = "aarch64-darwin";
systemUser = "nick";
isDarwin = true;
};
darwinConfigurations.Nicks-Mac-mini = mkSystem "Nicks-Mac-mini" {
system = "aarch64-darwin";
systemUser = "nick";
isDarwin = true;
};
};
}