-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
218 lines (199 loc) · 7.53 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
{
description = "dmayle's nix system configurations, both nixos and home-manager";
# This is a collection of sources to have their versions and hashes managed
# by this flake.
inputs = {
# ##########################################################################
# Core Flake Inputs (nixpkgs, systems, home-manager)
# ##########################################################################
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# ##########################################################################
# NixGL: Fixup OpenGL of nix programs on non-NixOS systems
# ##########################################################################
nixgl = {
url = "github:guibou/nixGL";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
# ##########################################################################
# Hyperland and Hy3 (tiled WM)
# ##########################################################################
hyprland = {
type = "git";
url = "https://github.com/hyprwm/hyprland";
#ref = "v0.45.0";
rev = "a425fbebe4cf4238e48a42f724ef2208959d66cf";
submodules = true;
inputs.nixpkgs.follows = "nixpkgs";
inputs.systems.follows = "systems";
};
hy3 = {
type = "git";
url = "https://github.com/outfoxxed/hy3";
#ref = "hl0.45.0-pre";
rev = "4c79361db9c065886c163d1cf873889e1e641e44";
inputs.hyprland.follows = "hyprland";
};
# ##########################################################################
# Sops-Nix (declarative secret management)
# ##########################################################################
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# ##########################################################################
# Disko (declarative disk configurations)
# ##########################################################################
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
# ##########################################################################
# Nix Colors (theming support)
# ##########################################################################
nix-colors = {
url = "github:misterio77/nix-colors";
inputs.nixpkgs-lib.follows = "nixpkgs-lib";
};
# ##########################################################################
# Neovim inputs (unpackaged plugins and spelling dictionaries)
# ##########################################################################
vim-fakeclip = {
url = "github:kana/vim-fakeclip";
flake = false;
};
NeoSolarized-nvim = {
url = "github:Tsuzat/NeoSolarized.nvim";
flake = false;
};
trouble_v3 = {
url = "github:dmayle/trouble.nvim/vim_uv";
flake = false;
};
nvim-spell-en-utf8-dictionary = {
url = "file+https://ftp.nluug.nl/vim/runtime/spell/en.utf-8.spl";
flake = false;
};
nvim-spell-en-utf8-suggestions = {
url = "file+https://ftp.nluug.nl/vim/runtime/spell/en.utf-8.sug";
flake = false;
};
nvim-spell-en-ascii-dictionary = {
url = "file+https://ftp.nluug.nl/vim/runtime/spell/en.ascii.spl";
flake = false;
};
nvim-spell-en-ascii-suggestions = {
url = "file+https://ftp.nluug.nl/vim/runtime/spell/en.ascii.sug";
flake = false;
};
nvim-spell-en-latin1-dictionary = {
url = "file+https://ftp.nluug.nl/vim/runtime/spell/en.latin1.spl";
flake = false;
};
nvim-spell-en-latin1-suggestions = {
url = "file+https://ftp.nluug.nl/vim/runtime/spell/en.latin1.sug";
flake = false;
};
nvim-spell-fr-utf8-dictionary = {
url = "file+https://ftp.nluug.nl/vim/runtime/spell/fr.utf-8.spl";
flake = false;
};
nvim-spell-fr-utf8-suggestions = {
url = "file+https://ftp.nluug.nl/vim/runtime/spell/fr.utf-8.sug";
flake = false;
};
nvim-spell-fr-latin1-dictionary = {
url = "file+https://ftp.nluug.nl/vim/runtime/spell/fr.latin1.spl";
flake = false;
};
nvim-spell-fr-latin1-suggestions = {
url = "file+https://ftp.nluug.nl/vim/runtime/spell/fr.latin1.sug";
flake = false;
};
# ##########################################################################
# Transient dependencies (input dependencies that I want to use my inputs)
# ##########################################################################
nixpkgs-lib = {
url = "github:nix-community/nixpkgs.lib";
};
flake-utils = {
url = "github:numtide/flake-utils";
inputs.systems.follows = "systems";
};
nix-eval-jobs = {
url = "github:nix-community/nix-eval-jobs";
inputs.nixpkgs.follows = "nixpkgs";
};
lib-aggregate = {
url = "github:nix-community/lib-aggregate";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs-lib.follows = "nixpkgs-lib";
};
};
# This flake outputs custom packages, development shells, overlays, and
# configurations for Home Manager and NixOS that take advantage of them.
outputs = inputs @ { self, systems, nixpkgs, ... }:
let
inherit (builtins) mapAttrs;
inherit (flib) loadModules mkPackages mkHomeConfig mkNixosConfig;
lib = nixpkgs.lib;
flib = import ./lib { inherit inputs lib; };
# Use nix-systems to configure supported systems.
eachSystem = lib.genAttrs (import systems);
# Load all modules only once.
modules = loadModules [
./dev-shells
./home-modules
./home-profiles
./home-roles
./home-configs
./overlays
./nixos-modules
./nixos-profiles
./nixos-roles
./nixos-configs
./packages
];
# Global nixpkgs config used in this flake.
pkgConfig = {
android_sdk.accept_license = true;
allowUnfree = true;
cudaSupport = true;
};
# Global nixpkgs overlays used in this flake.
overlays = [
# Make flake packages available to all configs
(final: prev: packages)
];
# Create an attrset of systems to nixpkgs for each system using config.
systemPackages = eachSystem (system:
mkPackages nixpkgs pkgConfig overlays system);
# Load all of the packages from this flake so they can also be used in the
# packages overlays.
packages = eachSystem (system: mapAttrs (name: p:
systemPackages.${system}.callPackage p {}) modules.packages);
# Load all of the devShells from this flake so they can also be used in
# the module args.
devShells = eachSystem (system:
mapAttrs (name: p:
import p { pkgs = systemPackages.${system}; }) modules.dev-shells);
# Args passed to all modules used for configurations.
extraArgs = { inherit inputs devShells; };
in
{
inherit devShells packages overlays;
homeManagerProfiles = modules.home-profiles;
homeManagerRoles = modules.home-roles;
homeConfigurations = mapAttrs (
mkHomeConfig systemPackages extraArgs) modules.home-configs;
nixosProfiles = modules.nixos-profiles;
nixosRoles = modules.nixos-roles;
nixosConfigurations = mapAttrs (
mkNixosConfig systemPackages extraArgs) modules.nixos-configs;
};
}