Kieran's opinionated (and probably slightly dumb) nix config
1{
2 description = "Kieran's opinionated (and probably slightly dumb) nix config";
3
4 inputs = {
5 # Nixpkgs
6 nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
7 nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
8
9 # NixOS hardware configuration
10 hardware.url = "github:NixOS/nixos-hardware/master";
11
12 # Home manager
13 home-manager.url = "github:nix-community/home-manager/release-25.05";
14 home-manager.inputs.nixpkgs.follows = "nixpkgs";
15
16 disko.url = "github:nix-community/disko";
17 disko.inputs.nixpkgs.follows = "nixpkgs";
18
19 # agenix
20 agenix.url = "github:ryantm/agenix";
21
22 spicetify-nix = {
23 url = "github:Gerg-L/spicetify-nix";
24 inputs.nixpkgs.follows = "nixpkgs";
25 };
26
27 catppuccin = {
28 url = "github:catppuccin/nix?rev=f518f96a60aceda4cd487437b25eaa48d0f1b97d";
29 inputs.nixpkgs.follows = "nixpkgs";
30 };
31
32 catppuccin-vsc = {
33 url = "https://flakehub.com/f/catppuccin/vscode/*.tar.gz";
34 };
35
36 nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
37
38 frc-nix = {
39 url = "github:frc4451/frc-nix";
40 inputs.nixpkgs.follows = "nixpkgs";
41 };
42
43 claude-desktop = {
44 url = "github:k3d3/claude-desktop-linux-flake";
45 inputs.nixpkgs.follows = "nixpkgs";
46 };
47
48 hyprland-contrib = {
49 url = "github:hyprwm/contrib";
50 inputs.nixpkgs.follows = "nixpkgs";
51 };
52
53 nixvim.url = "github:taciturnaxolotl/nixvim";
54
55 zed = {
56 url = "github:oscilococcinum/zen-browser-nix";
57 inputs.nixpkgs.follows = "nixpkgs";
58 };
59
60 terminal-wakatime = {
61 url = "github:taciturnaxolotl/terminal-wakatime";
62 inputs.nixpkgs.follows = "nixpkgs";
63 };
64
65 ctfd-alerts = {
66 url = "github:taciturnaxolotl/ctfd-alerts";
67 inputs.nixpkgs.follows = "nixpkgs";
68 };
69
70 flare = {
71 url = "github:ByteAtATime/flare/feat/nix";
72 inputs.nixpkgs.follows = "nixpkgs";
73 };
74
75 import-tree.url = "github:vic/import-tree";
76
77 nur = {
78 url = "github:nix-community/NUR";
79 inputs.nixpkgs.follows = "nixpkgs";
80 };
81 };
82
83 outputs =
84 {
85 self,
86 nixpkgs,
87 nixpkgs-unstable,
88 agenix,
89 home-manager,
90 nur,
91 ...
92 }@inputs:
93 let
94 outputs = inputs.self.outputs;
95 unstable-overlays = {
96 nixpkgs.overlays = [
97 (final: prev: {
98 unstable = import nixpkgs-unstable {
99 system = final.system;
100 config.allowUnfree = true;
101 };
102
103 bambu-studio = prev.bambu-studio.overrideAttrs (oldAttrs: {
104 version = "01.00.01.50";
105 src = prev.fetchFromGitHub {
106 owner = "bambulab";
107 repo = "BambuStudio";
108 rev = "v01.00.01.50";
109 hash = "sha256-7mkrPl2CQSfc1lRjl1ilwxdYcK5iRU//QGKmdCicK30=";
110 };
111 });
112 })
113 ];
114 };
115 in
116 {
117 # NixOS configuration entrypoint
118 # Available through 'nixos-rebuild --flake .#hostname'
119 nixosConfigurations = {
120 moonlark = nixpkgs.lib.nixosSystem {
121 specialArgs = { inherit inputs outputs; };
122 modules = [
123 inputs.disko.nixosModules.disko
124 { disko.devices.disk.disk1.device = "/dev/vda"; }
125 agenix.nixosModules.default
126 unstable-overlays
127 { nixpkgs.hostPlatform = "x86_64-linux"; }
128 ./machines/moonlark
129 nur.modules.nixos.default
130 ];
131 };
132 };
133
134 # Standalone home-manager configurations
135 # Available through 'home-manager --flake .#hostname'
136 homeConfigurations = {
137 "tacyon" = home-manager.lib.homeManagerConfiguration {
138 extraSpecialArgs = {
139 inherit inputs outputs;
140 nixpkgs-unstable = nixpkgs-unstable;
141 };
142 modules = [
143 ./machines/tacyon
144 unstable-overlays
145 { nixpgs.hostPlatform = "aarch64-linux"; }
146 ];
147 };
148
149 "nest" = home-manager.lib.homeManagerConfiguration {
150 extraSpecialArgs = {
151 inherit inputs outputs;
152 nixpkgs-unstable = nixpkgs-unstable;
153 };
154 modules = [
155 ./machines/nest
156 unstable-overlays
157 { nixpkgs.hostPlatform = "x86_64-linux"; }
158 ];
159 };
160
161 "ember" = home-manager.lib.homeManagerConfiguration {
162 extraSpecialArgs = {
163 inherit inputs outputs;
164 nixpkgs-unstable = nixpkgs-unstable;
165 };
166 modules = [
167 ./machines/ember
168 unstable-overlays
169 { nixpkgs.hostPlatform = "x86_64-linux"; }
170 ];
171 };
172 };
173
174 formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-tree;
175 };
176}