-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
129 lines (114 loc) · 2.77 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
128
129
{
description = "Trev's config flake";
nixConfig = {
extra-substituters = [
"https://trix.cachix.org"
];
extra-trusted-public-keys = [
"trix.cachix.org-1:uZzPf9A0ij1eIlDn9jg7fZyxUGfbZrcRujVMIG6apVA="
];
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# Zen browser
zen-browser = {
url = "github:0xc000022070/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
# Catppuccin
catppuccin = {
url = "github:catppuccin/nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Home manager
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# Nix vscode extensions
nix-vscode-extensions = {
url = "github:nix-community/nix-vscode-extensions";
inputs.nixpkgs.follows = "nixpkgs";
};
# Nix user repository
nur = {
url = "github:nix-community/NUR";
inputs.nixpkgs.follows = "nixpkgs";
};
# Filebrowser-upload
filebrowser-upload = {
url = "github:spotdemo4/filebrowser-upload";
inputs.nixpkgs.follows = "nixpkgs";
};
# Trevbar
trevbar = {
url = "github:spotdemo4/trevbar";
inputs.nixpkgs.follows = "nixpkgs";
};
# Hyprland
hyprland.url = "github:hyprwm/Hyprland";
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
};
outputs = {
self,
nixpkgs,
nur,
...
} @ inputs: let
build-systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forSystem = f:
nixpkgs.lib.genAttrs build-systems (
system:
f {
inherit system;
pkgs = import nixpkgs {
inherit system;
};
}
);
in {
nixosConfigurations = {
laptop = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
modules = [
nur.modules.nixos.default
./hosts/laptop/configuration.nix
];
};
desktop = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
modules = [
nur.modules.nixos.default
./hosts/desktop/configuration.nix
];
};
server = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
modules = [
./hosts/server/configuration.nix
];
};
};
checks = forSystem ({pkgs, ...}: {
nix = with pkgs;
runCommandLocal "check-nix" {
nativeBuildInputs = with pkgs; [
alejandra
];
} ''
cd ${./.}
alejandra -c .
touch $out
'';
});
formatter = forSystem ({pkgs, ...}: pkgs.alejandra);
};
}