-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
219 lines (203 loc) · 9.51 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
219
{
description = "System configuration";
inputs = {
canivete.url = github:schradert/canivete;
# TODO move these dependency shifts upstream
nixpkgs.url = github:nixos/nixpkgs/nixos-unstable;
home-manager.url = github:nix-community/home-manager;
home-manager.inputs.nixpkgs.follows = "canivete/nixpkgs";
nix-darwin.url = github:LnL7/nix-darwin;
nix-darwin.inputs.nixpkgs.follows = "canivete/nixpkgs";
canivete.inputs.nixpkgs.follows = "nixpkgs";
canivete.inputs.home-manager.follows = "home-manager";
canivete.inputs.nix-darwin.follows = "nix-darwin";
# TODO keep tabs on this project to see if it's evolving enough to try to use
# NOTE nix-doom-emacs marked as broken for now so we use overlay
# NOTE nix-doom-emacs-unstraightened might work better, but currently doesn't support org-roam
nix-doom-emacs.url = github:nix-community/nix-doom-emacs;
nix-doom-emacs.inputs.nixpkgs.follows = "canivete/nixpkgs";
# nix-doom-emacs-unstraightened.url = github:marienz/nix-doom-emacs-unstraightened;
# nix-doom-emacs-unstraightened.inputs.nixpkgs.follows = "canivete/nixpkgs";
emacs-overlay.url = github:nix-community/emacs-overlay;
emacs-overlay.inputs.nixpkgs.follows = "canivete/nixpkgs";
emacs-overlay.inputs.nixpkgs-stable.follows = "canivete/nixpkgs-stable";
# Secret management in Nix deployments
sops-nix.url = github:Mic92/sops-nix;
sops-nix.inputs.nixpkgs.follows = "canivete/nixpkgs";
sops-nix.inputs.nixpkgs-stable.follows = "canivete/nixpkgs-stable";
# Authenticate with GKE clusters using kubectl
gke-gcloud-auth-plugin-flake.url = github:christian-blades-cb/gke-gcloud-auth-plugin-nix;
# Spotify ecosystem
spicetify-nix.url = github:Gerg-L/spicetify-nix;
spicetify-nix.inputs.nixpkgs.follows = "canivete/nixpkgs";
# NixOS on steamdeck
jovian.url = github:Jovian-Experiments/Jovian-NixOS;
jovian.inputs.nixpkgs.follows = "canivete/nixpkgs";
# Docker images
nix2container.url = github:nlewo/nix2container;
nix2container.inputs.nixpkgs.follows = "canivete/nixpkgs";
# More useful modules
devusb.url = github:devusb/nix-packages;
devusb.inputs.nixpkgs.follows = "canivete/nixpkgs";
devusb.inputs.flake-parts.follows = "canivete/flake-parts";
# WezTerm nightly
wezterm.url = github:wez/wezterm/main?dir=nix;
wezterm.inputs.nixpkgs.follows = "canivete/nixpkgs";
# NOTE WezTerm rust-overlay conflict (they did update it, but maybe it's a nixpkgs/nixos problem?)
rust-overlay.url = github:oxalica/rust-overlay;
rust-overlay.inputs.nixpkgs.follows = "canivete/nixpkgs";
wezterm.inputs.rust-overlay.follows = "rust-overlay";
# Steam library manager
nostatoo.url = github:samueldr/nostatoo;
nostatoo.flake = false;
# Umu game launcher
umu.url = github:Open-Wine-Components/umu-launcher?dir=packaging/nix&submodules=1;
umu.inputs.nixpkgs.follows = "canivete/nixpkgs";
# mkWindowsApp
erosanix.url = github:emmanuelrosa/erosanix;
erosanix.inputs.nixpkgs.follows = "canivete/nixpkgs";
# Wayland launcher
walker.url = github:abenz1267/walker;
walker.inputs.nixpkgs.follows = "canivete/nixpkgs";
# AGS GTK widget design
astal.url = github:aylur/astal;
astal.inputs.nixpkgs.follows = "canivete/nixpkgs";
ags.url = github:aylur/ags;
ags.inputs.nixpkgs.follows = "canivete/nixpkgs";
# Hyprland
hyprland.url = github:hyprwm/Hyprland;
hyprland.inputs.nixpkgs.follows = "canivete/nixpkgs";
hyprland-plugins.url = github:hyprwm/hyprland-plugins;
hyprland-plugins.inputs.hyprland.follows = "hyprland";
hyprland-plugins.inputs.nixpkgs.follows = "canivete/nixpkgs";
hyprfocus.url = github:pyt0xic/hyprfocus;
hyprfocus.inputs.hyprland.follows = "hyprland";
hyprsplit.url = github:shezdy/hyprsplit;
hyprsplit.inputs.hyprland.follows = "hyprland";
# TODO track PR https://github.com/outfoxxed/hy3/pull/156 to revert to master
hy3.url = github:outfoxxed/hy3/36340e627d1b9c844ce73443db042c953ffdd1bf;
hy3.inputs.hyprland.follows = "hyprland";
# TODO track PR https://github.com/KZDKM/Hyprspace/pull/111 to revert to master
hyprspace.url = github:KZDKM/Hyprspace/2f239d0569f8c380338bbd5aef99e7e8c41b9a09;
hyprspace.inputs.hyprland.follows = "hyprland";
# TODO revert to version pinning
aquamarine.url = github:hyprwm/aquamarine;
aquamarine.inputs.nixpkgs.follows = "hyprland/nixpkgs";
aquamarine.inputs.hyprutils.follows = "hyprland/hyprutils";
aquamarine.inputs.hyprwayland-scanner.follows = "hyprland/hyprwayland-scanner";
hyprland.inputs.aquamarine.follows = "aquamarine";
hyprcursor.url = github:hyprwm/hyprcursor;
hyprcursor.inputs.nixpkgs.follows = "hyprland/nixpkgs";
hyprcursor.inputs.hyprlang.follows = "hyprland/hyprlang";
hyprland.inputs.hyprcursor.follows = "hyprcursor";
hyprland-protocols.url = github:hyprwm/hyprland-protocols;
hyprland-protocols.inputs.nixpkgs.follows = "hyprland/nixpkgs";
hyprland.inputs.hyprland-protocols.follows = "hyprland-protocols";
hyprlang.url = github:hyprwm/hyprlang;
hyprlang.inputs.nixpkgs.follows = "hyprland/nixpkgs";
hyprlang.inputs.hyprutils.follows = "hyprland/hyprutils";
hyprland.inputs.hyprlang.follows = "hyprlang";
hyprutils.url = github:hyprwm/hyprutils;
hyprutils.inputs.nixpkgs.follows = "hyprland/nixpkgs";
hyprland.inputs.hyprutils.follows = "hyprutils";
hyprwayland-scanner.url = github:hyprwm/hyprwayland-scanner;
hyprwayland-scanner.inputs.nixpkgs.follows = "hyprland/nixpkgs";
hyprland.inputs.hyprwayland-scanner.follows = "hyprwayland-scanner";
xdph.url = github:hyprwm/xdg-desktop-portal-hyprland;
xdph.inputs.nixpkgs.follows = "hyprland/nixpkgs";
xdph.inputs.hyprutils.follows = "hyprland/hyprutils";
xdph.inputs.hyprlang.follows = "hyprland/hyprlang";
xdph.inputs.hyprwayland-scanner.follows = "hyprland/hyprwayland-scanner";
xdph.inputs.hyprland-protocols.follows = "hyprland/hyprland-protocols";
hyprland.inputs.xdph.follows = "xdph";
# TODO fix wiimmfi login
# TODO FHS compatibility with envfs and nix-ld
# NOTE https://github.com/nix-community/nix-ld
# NOTE https://github.com/Mic92/envfs
# NOTE Mic92's example: https://github.com/Mic92/dotfiles/blob/main/machines/modules/fhs-compat.nix
};
outputs = inputs:
inputs.canivete.lib.mkFlake {
inherit inputs;
everything = [./modules ./builds];
} ({
config,
nix,
...
}:
with nix; {
dotfiles.domain = "trdos.me";
canivete.root = "sirver";
canivete.people = {
me = "tristan";
users.tristan = {
name = "Tristan Schrader";
accounts.github = "schradert";
accounts.gitlab = "schrader.tristan";
profiles.default.email = "[email protected]";
profiles.work.email = "[email protected]";
};
};
canivete.pkgs.config = {
allowUnfreePredicate = pkg:
elem (getName pkg) [
"android-studio-stable"
"aspell-dict-en-science"
"discord"
"displaylink"
"raycast"
"slack"
"spotify"
"beeper"
"steam-run"
"steam-jupiter-original"
"steam-jupiter-unwrapped"
"steam"
"steamcmd"
"steamdeck-hw-theme"
"steam-original"
# Sabnzbd only supports unrar currently, but unar is a better alternative to keep track of
# NOTE https://github.com/sabnzbd/sabnzbd/issues/1120
"unrar"
];
};
perSystem = {
config,
pkgs,
...
}: {
packages.default = pkgs.wrapFlags config.packages.opentofu "--add-flags \"deploy\"";
canivete.pre-commit.languages.shell.enable = true;
canivete.pre-commit.settings = {
excludes = [".canivete/sops/.+"];
# TODO extract these tool configurations into options
hooks.lychee.settings.configPath = toString (pkgs.writers.writeTOML "lychee.toml" {
exclude_path = ["^\./modules/programs/emacs/config\.org$"];
exclude = [
# These helm repositories don't have parent pages
"https://seaweedfs.github.io/seaweedfs/helm"
"https://seaweedfs.github.io/seaweedfs-csi-driver/helm"
"https://charts.rook.io/release"
"https://kubernetes-sigs.github.io/descheduler"
"https://kubernetes-sigs.github.io/node-feature-discovery/charts"
"https://k8tz.github.io/k8tz"
"https://opensource.zalando.com/postgres-operator/charts/postgres-operator"
"https://opensource.zalando.com/postgres-operator/charts/postgres-operator-ui"
"https://gitlab.com/api/v4/projects/43892189/packages/helm/stable"
# Cluster local addresses
"svc.cluster.local"
# URLs built with substitution
"^.+\${.+}.+$"
# DNS authority
"^.+/dns-query$"
];
});
# Used in vim configuration
hooks.typos.settings.configPath = toString (pkgs.writers.writeTOML "_typos.toml" {default.extend-words.enew = "enew";});
# zsh not really supported by shfmt
hooks.shfmt.excludes = ["programs/zsh/.p10k.zsh"];
};
};
flake.dotfiles = mapAttrs (_: getAttr "dotfiles") config.allSystems;
});
}