-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
75 lines (67 loc) · 2.01 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
{
description = "asm nix configuration";
nixConfig = {
experimental-features = [ "nix-command" "flakes" ];
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
mise-flake = {
url = "github:jdx/mise";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
nur.url = "github:nix-community/NUR";
};
outputs =
inputs @ { self
, nixpkgs
, flake-utils
, home-manager
, mise-flake
, nur
, ...
}:
let
supportedSystems = [ "x86_64-darwin" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsConfig = {
allowUnfree = true;
input-fonts.acceptLicense = true;
};
legacyPackages = forAllSystems (
system:
import nixpkgs {
inherit system;
overlays = [ mise-flake.overlay ];
config = nixpkgsConfig;
}
);
# nurModules = forAllSystems (
# system:
# import nur {
# nurpkgs = legacyPackages."${system}";
# pkgs = legacyPackages."${system}";
# }
# );
homeManagerConfigs = forAllSystems (
system: {
pkgs = legacyPackages."${system}";
modules = [
./home
];
}
);
in
{
formatter.aarch64-darwin = nixpkgs.legacyPackages."aarch64-darwin".nixpkgs-fmt;
formatter.x86_64-darwin = nixpkgs.legacyPackages."x86_64-darwin".nixpkgs-fmt;
homeConfigurations."asm-mbp-16" = home-manager.lib.homeManagerConfiguration homeManagerConfigs."x86_64-darwin";
homeConfigurations."asm-mbp-14" = home-manager.lib.homeManagerConfiguration homeManagerConfigs."aarch64-darwin";
homeConfigurations."asm-mba-13" = home-manager.lib.homeManagerConfiguration homeManagerConfigs."aarch64-darwin";
};
}