-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
104 lines (99 loc) · 3.17 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
{
description = "Tlam's NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
wgsl-analyzer = {
url = "github:wgsl-analyzer/wgsl-analyzer";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
zig.url = "github:mitchellh/zig-overlay";
zls.url = "github:zigtools/zls";
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = {
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs";
};
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.3.0";
inputs.nixpkgs.follows = "nixpkgs";
};
codeium = {
url = "github:Exafunction/codeium.nvim";
inputs.nixpkgs.follows = "nixpkgs";
};
firefox-nightly = {
url = "github:nix-community/flake-firefox-nightly";
inputs.nixpkgs.follows = "nixpkgs";
};
# A wayland native krunner-like runner, made with customizability in mind.
anyrun = {
url = "github:Kirottu/anyrun";
inputs.nixpkgs.follows = "nixpkgs";
};
ghostty.url = "git+ssh://[email protected]/ghostty-org/ghostty";
};
outputs = inputs @ {
nixpkgs,
zls,
...
}: let
overlays = [
inputs.neovim-nightly-overlay.overlays.default
inputs.zig.overlays.default
(_final: _prev: {inherit zls;})
(_final: prev: {inherit (inputs.firefox-nightly.packages.${prev.system}) firefox-nightly-bin;})
(_final: prev: {wgsl-analyzer = inputs.wgsl-analyzer.packages.${prev.system}.default;})
(_final: prev: {ghostty = inputs.ghostty.packages.${prev.system}.default;})
];
mkSystem = import ./lib/mksystem.nix {
inherit overlays nixpkgs inputs;
};
in {
# Bainary cache hint in Flakes https://nixos.wiki/wiki/Binary_Cache#Binary_cache_hint_in_Flakes
nixConfig = {
extra-substituters = [
"https://nix-community.cachix.org"
"https://hyprland.cachix.org"
"https://anyrun.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs"
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
];
};
nixosConfigurations.vm-aarch64-utm = mkSystem "vm-aarch64-utm" {
system = "aarch64-linux";
user = "terrencelam";
};
nixosConfigurations.amd-linux = mkSystem "amd-linux" {
system = "x86_64-linux";
user = "terrencelam";
};
darwinConfigurations.macbook-pro-m2 = mkSystem "macbook-pro-m2" {
system = "aarch64-darwin";
user = "terrencelam";
darwin = true;
};
};
}