nixos configs
1{
2 description = "bates64";
3
4 nixConfig = {
5 extra-substituters = [
6 "https://cache.numtide.com"
7 "https://cuda-maintainers.cachix.org"
8 ];
9 extra-trusted-public-keys = [
10 "niks3.numtide.com-1:DTx8wZduET09hRmMtKdQDxNNthLQETkc/yaX7M4qK0g="
11 "cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
12 ];
13 };
14
15 inputs = {
16 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
17 llm-agents.url = "github:numtide/llm-agents.nix";
18 llm-agents.inputs.nixpkgs.follows = "nixpkgs";
19
20 minegrub-world-sel-theme.url = "github:Lxtharia/minegrub-world-sel-theme";
21 minegrub-world-sel-theme.inputs.nixpkgs.follows = "nixpkgs";
22
23 minecraft-plymouth-theme.url = "github:nikp123/minecraft-plymouth-theme";
24
25 home-manager.url = "github:nix-community/home-manager";
26 home-manager.inputs.nixpkgs.follows = "nixpkgs";
27
28 nix-darwin.url = "github:nix-darwin/nix-darwin";
29 nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
30
31 nixvim.url = "github:nix-community/nixvim";
32 nixvim.inputs.nixpkgs.follows = "nixpkgs";
33
34 # TODO: install nixos-chrome-pwa as a flake
35 # https://github.com/Luis-Hebendanz/nixos-chrome-pwa?tab=readme-ov-file#install-as-a-flake
36
37 vscode-server.url = "github:nix-community/nixos-vscode-server";
38 vscode-server.inputs.nixpkgs.follows = "nixpkgs";
39
40 nixgl.url = "github:nix-community/nixGL";
41 nixgl.inputs.nixpkgs.follows = "nixpkgs";
42
43 disko.url = "github:nix-community/disko/latest";
44 disko.inputs.nixpkgs.follows = "nixpkgs";
45
46 nix-minecraft.url = "github:Infinidoge/nix-minecraft";
47 nix-minecraft.inputs.nixpkgs.follows = "nixpkgs";
48
49 zen-browser = {
50 url = "github:0xc000022070/zen-browser-flake/beta";
51 inputs = {
52 nixpkgs.follows = "nixpkgs";
53 home-manager.follows = "home-manager";
54 };
55 };
56 firefox-addons = {
57 url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
58 inputs.nixpkgs.follows = "nixpkgs";
59 };
60 niri = {
61 url = "github:sodiboo/niri-flake";
62 inputs.nixpkgs.follows = "nixpkgs";
63 };
64 hammerspoon-nix = {
65 url = "github:DivitMittal/hammerspoon-nix";
66 };
67 noctalia = {
68 url = "github:noctalia-dev/noctalia-shell";
69 inputs.nixpkgs.follows = "nixpkgs";
70 };
71 nix-jetbrains-plugins = {
72 url = "github:nix-community/nix-jetbrains-plugins";
73 inputs.nixpkgs.follows = "nixpkgs";
74 };
75 starship-jj = {
76 url = "gitlab:lanastara_foss/starship-jj";
77 inputs.nixpkgs.follows = "nixpkgs";
78 };
79 nixpkgs-otbr = {
80 url = "github:mrene/nixpkgs/openthread-border-router";
81 };
82 };
83
84 outputs =
85 {
86 nixpkgs,
87 home-manager,
88 nix-darwin,
89 ...
90 }@inputs:
91 let
92 overlays = [
93 inputs.nixgl.overlay
94 ];
95 pkgs-x86_64 = import nixpkgs {
96 system = "x86_64-linux";
97 inherit overlays;
98 config.allowUnfree = true;
99 };
100 pkgs-aarch64-darwin = import nixpkgs {
101 system = "aarch64-darwin";
102 inherit overlays;
103 config.allowUnfree = true;
104 };
105 in
106 {
107 nixosConfigurations = {
108 # Desktop PC
109 merlon = nixpkgs.lib.nixosSystem {
110 system = "x86_64-linux";
111 pkgs = pkgs-x86_64;
112 specialArgs = { inherit inputs; };
113 modules = [
114 ./hosts/merlon/configuration.nix
115 home-manager.nixosModules.home-manager
116 ];
117 };
118 # Hetzner VPS
119 merlow = nixpkgs.lib.nixosSystem {
120 system = "x86_64-linux";
121 pkgs = pkgs-x86_64;
122 specialArgs = { inherit inputs; };
123 modules = [
124 ./hosts/merlow/configuration.nix
125 home-manager.nixosModules.home-manager
126 ];
127 };
128 # Homelab
129 watt = nixpkgs.lib.nixosSystem {
130 system = "x86_64-linux";
131 pkgs = pkgs-x86_64;
132 specialArgs = { inherit inputs; };
133 modules = [
134 ./hosts/watt/configuration.nix
135 home-manager.nixosModules.home-manager
136 ];
137 };
138 };
139
140 darwinConfigurations = {
141 # MacBook Air 15
142 nolrem = nix-darwin.lib.darwinSystem {
143 pkgs = pkgs-aarch64-darwin;
144 specialArgs = { inherit inputs; };
145 modules = [
146 ./hosts/nolrem/configuration.nix
147 home-manager.darwinModules.home-manager
148 ];
149 };
150 # (Work) MacBook Pro
151 "FH91CFY4QP-2" = nix-darwin.lib.darwinSystem {
152 pkgs = pkgs-aarch64-darwin;
153 specialArgs = { inherit inputs; };
154 modules = [
155 ./hosts/work-mbp/configuration.nix
156 home-manager.darwinModules.home-manager
157 ];
158 };
159 };
160
161 # (Work) PC
162 homeConfigurations.alebat01 = home-manager.lib.homeManagerConfiguration {
163 pkgs = pkgs-x86_64;
164 modules = [
165 ./home/alebat01/home.nix
166 ./modules/home/auto-upgrade.nix
167 ];
168 extraSpecialArgs = { inherit inputs; };
169 };
170 };
171}