-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
112 lines (94 loc) · 2.93 KB
/
flake.nix
File metadata and controls
112 lines (94 loc) · 2.93 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
{
description = "My NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
apple-silicon = {
url = "github:anshulnoori/nixos-apple-silicon";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
# NOTE: Hyprland intentionally does NOT follow our nixpkgs. It requires its
# own pinned nixpkgs for ABI compatibility with mesa/wlroots. This is per
# upstream recommendation. See modules/nixos/desktop/graphics.nix.
hyprland.url = "github:hyprwm/Hyprland";
stylix = {
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ {
flake-parts,
nixpkgs,
home-manager,
apple-silicon,
...
}:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = [
"aarch64-linux"
];
perSystem = {pkgs, ...}: {
packages = import ./pkgs pkgs;
formatter = pkgs.alejandra;
devShells.default = pkgs.mkShell {
packages = with pkgs; [
nil
alejandra
git
];
};
};
flake = {
overlays = import ./overlays {inherit inputs;};
nixosModules.default = import ./modules/nixos;
homeModules.default = import ./modules/home-manager;
templates = import ./templates;
nixosConfigurations = {
macbook = let
user = "mvs";
in
nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
specialArgs = {inherit inputs;};
modules = [
apple-silicon.nixosModules.apple-silicon-support
./hosts/macbook/configuration.nix
inputs.self.nixosModules.default
inputs.agenix.nixosModules.default
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {inherit inputs;};
home-manager.users.${user} = import ./users/${user}/home.nix;
}
];
};
benchmark = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
specialArgs = {inherit inputs;};
modules = [
apple-silicon.nixosModules.apple-silicon-support
inputs.agenix.nixosModules.default
./hosts/benchmark/configuration.nix
];
};
};
};
};
}