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 cedarlogic = {
83 url = "github:taciturnaxolotl/CedarLogic";
84 inputs.nixpkgs.follows = "nixpkgs";
85 };
86 };
87
88 outputs =
89 {
90 self,
91 nixpkgs,
92 nixpkgs-unstable,
93 agenix,
94 home-manager,
95 nur,
96 ...
97 }@inputs:
98 let
99 outputs = inputs.self.outputs;
100 unstable-overlays = {
101 nixpkgs.overlays = [
102 (final: prev: {
103 unstable = import nixpkgs-unstable {
104 system = final.system;
105 config.allowUnfree = true;
106 };
107
108 bambu-studio = prev.bambu-studio.overrideAttrs (oldAttrs: {
109 version = "01.00.01.50";
110 src = prev.fetchFromGitHub {
111 owner = "bambulab";
112 repo = "BambuStudio";
113 rev = "v01.00.01.50";
114 hash = "sha256-7mkrPl2CQSfc1lRjl1ilwxdYcK5iRU//QGKmdCicK30=";
115 };
116 });
117 })
118 ];
119 };
120 in
121 {
122 # NixOS configuration entrypoint
123 # Available through 'nixos-rebuild --flake .#hostname'
124 nixosConfigurations = {
125 moonlark = nixpkgs.lib.nixosSystem {
126 specialArgs = { inherit inputs outputs; };
127 modules = [
128 inputs.disko.nixosModules.disko
129 { disko.devices.disk.disk1.device = "/dev/vda"; }
130 agenix.nixosModules.default
131 unstable-overlays
132 { nixpkgs.hostPlatform = "x86_64-linux"; }
133 ./machines/moonlark
134 nur.modules.nixos.default
135 ];
136 };
137 };
138
139 # Standalone home-manager configurations
140 # Available through 'home-manager --flake .#hostname'
141 homeConfigurations = {
142 "tacyon" = home-manager.lib.homeManagerConfiguration {
143 extraSpecialArgs = {
144 inherit inputs outputs;
145 nixpkgs-unstable = nixpkgs-unstable;
146 };
147 modules = [
148 ./machines/tacyon
149 unstable-overlays
150 { nixpgs.hostPlatform = "aarch64-linux"; }
151 ];
152 };
153
154 "nest" = home-manager.lib.homeManagerConfiguration {
155 extraSpecialArgs = {
156 inherit inputs outputs;
157 nixpkgs-unstable = nixpkgs-unstable;
158 };
159 modules = [
160 ./machines/nest
161 unstable-overlays
162 { nixpkgs.hostPlatform = "x86_64-linux"; }
163 ];
164 };
165
166 "ember" = home-manager.lib.homeManagerConfiguration {
167 extraSpecialArgs = {
168 inherit inputs outputs;
169 nixpkgs-unstable = nixpkgs-unstable;
170 };
171 modules = [
172 ./machines/ember
173 unstable-overlays
174 { nixpkgs.hostPlatform = "x86_64-linux"; }
175 ];
176 };
177 };
178
179 formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-tree;
180 };
181}