-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
95 lines (78 loc) · 1.93 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
{
description = "Nix Flake for independent nix-darwin and home-manager configurations";
inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
darwin = {
url = "github:LnL7/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix.url = "github:danth/stylix";
};
outputs = {
self,
nixpkgs,
darwin,
home-manager,
stylix,
...
}@inputs:
let
system = "aarch64-darwin";
pkgs = import nixpkgs {
inherit system;
config = {
allowUnfree = true;
};
};
specialArgs = {
inherit inputs system personal;
};
extraSpecialArgs = {
inherit inputs system personal work;
};
personal = {
user = "byron";
timeZone = "Pacific/Auckland";
defaultLocale = "en_NZ.UTF-8";
city = "Auckland";
# Used for gitconfig
gitUser = "Estanz0";
gitEmail = "68315031+Estanz0@users.noreply.github.com";
};
work = {
user = "byronsmith";
};
in
{
# nix-darwin configuration
darwinConfigurations."Byrons-Mac-mini" = darwin.lib.darwinSystem {
inherit pkgs specialArgs;
modules = [
./hosts/mac-mini-m4/darwin-configuration.nix
];
};
# home-manager configuration
homeConfigurations = {
"${personal.user}@Byrons-Mac-mini" = home-manager.lib.homeManagerConfiguration {
inherit pkgs extraSpecialArgs;
modules = [
./hosts/mac-mini-m4/home.nix
stylix.homeManagerModules.stylix
];
};
"${work.user}" = home-manager.lib.homeManagerConfiguration {
inherit pkgs extraSpecialArgs;
modules = [
./hosts/macbook-air-m2/home.nix
inputs.stylix.homeManagerModules.stylix
];
};
};
};
}