-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
72 lines (70 loc) · 2.06 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
{
description = "YorikSar's personal configuration files";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
# latest opensource terraform version
tf-nixpkgs.url = "github:NixOS/nixpkgs/e12483116b3b51a185a33a272bf351e357ba9a99";
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
darwin = {
url = "github:LnL7/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-index-database = {
url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
home-manager,
darwin,
...
} @ inputs: {
lib = import ./nix/lib inputs;
homeProfiles = with nixpkgs.lib;
listToAttrs (map
(
fileName:
nameValuePair (removeSuffix ".nix" fileName) (import ./nix/profiles/${fileName})
)
(attrNames (builtins.readDir ./nix/profiles)));
homeConfigurations = self.lib.hmConfigurations "aarch64-darwin" {
yorik = self.homeProfiles.home;
mira = self.homeProfiles.mirantis;
tweag = self.homeProfiles.tweag;
};
darwinConfigurations = {
leya = darwin.lib.darwinSystem {
system = "aarch64-darwin";
modules = [./nix/darwin/leya.nix];
};
backup-mac = darwin.lib.darwinSystem {
system = "x86_64-darwin";
modules = [
./nix/darwin/backup-mac.nix
home-manager.darwinModules.home-manager
];
};
};
checks = let
hmChecks = self.lib.homeConfigurationsChecks self.homeConfigurations;
darwinChecks = {
aarch64-darwin.leya = self.darwinConfigurations.leya.system;
x86_64-darwin.backup-mac = self.darwinConfigurations.backup-mac.system;
};
in
hmChecks
// {
aarch64-darwin = hmChecks.aarch64-darwin // darwinChecks.aarch64-darwin;
inherit (darwinChecks) x86_64-darwin;
};
};
}