-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
179 lines (171 loc) · 5.96 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
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
inputs.nixpkgs-unstable.url = "flake:nixpkgs";
inputs.home-manager.url = "github:nix-community/home-manager";
inputs.home-manager.inputs.nixpkgs.follows = "nixpkgs-unstable";
inputs.charm.url = "github:charmbracelet/nur";
inputs.charm.inputs.nixpkgs.follows = "nixpkgs-unstable";
inputs.carlos.url = "github:caarlos0/nur";
inputs.carlos.inputs.nixpkgs.follows = "nixpkgs-unstable";
inputs.ghostty.url = "git+ssh://[email protected]/ghostty-org/ghostty";
inputs.rio.url = "github:raphamorim/rio";
inputs.rio.inputs.nixpkgs.follows = "nixpkgs";
# NeoVim Plugins
inputs.smear.url = "github:sphamba/smear-cursor.nvim";
inputs.smear.flake = false;
# Lua fzy implementation
inputs.fzyLua.url = "https://raw.githubusercontent.com/swarn/fzy-lua/a3f1dd75725b535e6b00af84048c7e066432f530/src/fzy_lua.lua";
inputs.fzyLua.flake = false;
# macOS stuff
inputs.mkAlias.url = "github:cdmistman/mkAlias";
inputs.mkAlias.inputs.nixpkgs.follows = "nixpkgs-unstable";
inputs.blenderMacOSAarch64.url = "https://mirror.clarkson.edu/blender/release/Blender4.3/blender-4.3.1-macos-arm64.dmg";
inputs.blenderMacOSAarch64.flake = false;
inputs.blenderMacOSx86_64.url = "https://mirror.clarkson.edu/blender/release/Blender4.3/blender-4.3.1-macos-x64.dmg";
inputs.blenderMacOSx86_64.flake = false;
inputs.dozer.url = "https://github.com/Mortennn/Dozer/releases/download/v4.0.0/Dozer.4.0.0.dmg";
inputs.dozer.flake = false;
inputs.hammerspoon.url = "https://github.com/Hammerspoon/hammerspoon/releases/download/1.0.0/Hammerspoon-1.0.0.zip";
inputs.hammerspoon.flake = false;
inputs.monitorcontrol.url = "https://github.com/MonitorControl/MonitorControl/releases/download/v4.3.3/MonitorControl.4.3.3.dmg";
inputs.monitorcontrol.flake = false;
# Fonts
inputs.anchor.url = "git+ssh://git.rocha.is/anchor";
inputs.anchor.flake = false;
inputs.arno-pro.url = "git+ssh://git.rocha.is/arno-pro";
inputs.arno-pro.flake = false;
inputs.benjamins-gothic.url = "git+ssh://git.rocha.is/benjamins-gothic";
inputs.benjamins-gothic.flake = false;
inputs.gabriello.url = "git+ssh://git.rocha.is/gabriello";
inputs.gabriello.flake = false;
inputs.gelion.url = "git+ssh://git.rocha.is/gelion";
inputs.gelion.flake = false;
inputs.larsseit.url = "git+ssh://git.rocha.is/larsseit";
inputs.larsseit.flake = false;
inputs.liza.url = "git+ssh://git.rocha.is/liza";
inputs.liza.flake = false;
inputs.maru.url = "git+ssh://git.rocha.is/maru";
inputs.maru.flake = false;
inputs.monoflow.url = "git+ssh://git.rocha.is/monoflow";
inputs.mononoki.url = "git+ssh://git.rocha.is/mononoki";
inputs.mononoki.flake = false;
inputs.mori.url = "git+ssh://git.rocha.is/mori";
inputs.mori.flake = false;
inputs.monoflow.flake = false;
inputs.neufile-grotesk.url = "git+ssh://git.rocha.is/neufile-grotesk";
inputs.neufile-grotesk.flake = false;
inputs.pique.url = "git+ssh://git.rocha.is/pique";
inputs.pique.flake = false;
inputs.pangaia.url = "git+ssh://git.rocha.is/pangaia";
inputs.pangaia.flake = false;
inputs.rifton.url = "git+ssh://git.rocha.is/rifton";
inputs.rifton.flake = false;
inputs.rois.url = "git+ssh://git.rocha.is/rois";
inputs.rois.flake = false;
inputs.sf-mono.url = "git+ssh://git.rocha.is/sf-mono";
inputs.sf-mono.flake = false;
inputs.saans.url = "git+ssh://git.rocha.is/saans";
inputs.saans.flake = false;
inputs.symbolset.url = "git+ssh://git.rocha.is/symbolset";
inputs.symbolset.flake = false;
inputs.untitled-sans.url = "git+ssh://git.rocha.is/untitled-sans";
inputs.untitled-sans.flake = false;
inputs.upton.url = "git+ssh://git.rocha.is/upton";
inputs.upton.flake = false;
outputs = inputs @ {
self,
nixpkgs,
nixpkgs-unstable,
home-manager,
...
}: let
lib = nixpkgs.lib;
x86_64-linux = "x86_64-linux";
x86_64-darwin = "x86_64-darwin";
aarch64-darwin = "aarch64-darwin";
mkSystem = {
hostname,
system ? x86_64-linux,
default ? false,
headless ? false,
}:
{
nixosConfigurations."${hostname}" = lib.nixosSystem {
inherit system;
modules = [
{
nixpkgs.overlays = [
(self: super: {
# Enable CUDA/Optix in Blender
blender = super.blender.override {cudaSupport = true;};
})
];
}
({
pkgs,
modulesPath,
...
}: {
system.configurationRevision = lib.mkIf (self ? rev) self.rev;
})
(import ./modules/nixos hostname)
];
};
homeManagerConfigurations."christian@${hostname}" =
import ./modules/home
{
pkgs = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
inherit system home-manager inputs headless;
};
}
// (
let
target =
if default
then "default"
else "christian@${hostname}";
in {
packages."${system}"."${target}" = self.homeManagerConfigurations."christian@${hostname}".activationPackage;
}
);
in
lib.foldr lib.recursiveUpdate {} (map mkSystem [
{
# NixOS Desktop
hostname = "whitenoise";
system = x86_64-linux;
default = true;
}
{
# NixOS Desktop
hostname = "athena";
system = x86_64-linux;
}
{
# iMac Pro
hostname = "thunderclap";
system = x86_64-darwin;
default = true;
}
{
# MacBook Pro
hostname = "meowmachine";
system = aarch64-darwin;
default = true;
}
{
# MacBook Air
hostname = "la-tigra";
system = aarch64-darwin;
}
{
# NixOS VPS
hostname = "jackie";
system = x86_64-linux;
headless = true;
}
]);
}