-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
127 lines (108 loc) · 3.21 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
{
nixConfig = {
experimental-features = [ "nix-command" "flakes" ];
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-2.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
apple-silicon = {
url = "github:tpwrules/nixos-apple-silicon";
inputs.nixpkgs.follows = "nixpkgs";
};
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.2";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix = {
url = "github:ryantm/agenix";
inputs = {
darwin.follows = "darwin";
nixpkgs.follows = "nixpkgs";
home-manager.follows = "home-manager";
};
};
flake-utils.url = "github:numtide/flake-utils";
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
darwin = {
url = "github:lnl7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
language-servers = {
url = "github:kitten/language-servers.nix";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
nvim-plugins = {
url = "github:kitten/system-nvim-plugins.nix";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
yeetmouse = {
url = "github:kitten/yeetmouse/next?dir=nix";
inputs.nixpkgs.follows = "nixpkgs";
};
android-sdk = {
url = "github:tadfisher/android-nixpkgs/stable";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
};
outputs = inputs: let
inherit (inputs.nixpkgs) lib;
inherit (import ./lib/system.nix inputs) mkSystem;
eachSystem = lib.genAttrs ["aarch64-darwin" "aarch64-linux" "x86_64-darwin" "x86_64-linux"];
overlays = [
inputs.lix-module.overlays.lixFromNixpkgs
inputs.nvim-plugins.overlays.default
inputs.android-sdk.overlays.default
inputs.language-servers.overlays.default
];
in {
darwinConfigurations."sprite" = mkSystem {
inherit overlays;
system = "aarch64-darwin";
hostname = "sprite";
};
darwinConfigurations."fanta" = mkSystem {
inherit overlays;
system = "aarch64-darwin";
hostname = "fanta";
};
nixosConfigurations."pepper" = mkSystem {
inherit overlays;
system = "x86_64-linux";
hostname = "pepper";
};
nixosConfigurations."cola" = mkSystem {
inherit overlays;
system = "x86_64-linux";
hostname = "cola";
};
nixosConfigurations."ramune" = mkSystem {
inherit overlays;
system = "aarch64-linux";
hostname = "ramune";
};
packages = eachSystem (system: {
inherit (inputs.agenix.packages.${system}) agenix;
inherit (inputs.darwin.packages.${system}) darwin-rebuild;
} // (import ./lib/pkgs inputs.nixpkgs.legacyPackages.${system}));
apps = eachSystem (system: import ./lib/apps {
inherit lib;
pkgs = inputs.nixpkgs.legacyPackages.${system};
});
};
}