my nix configs for my servers and desktop
1# flake.nix
2{
3 inputs = {
4 nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
5 nixos-hardware.url = "github:nixos/nixos-hardware/master";
6
7 lix-module = {
8 url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.0.tar.gz";
9 inputs.nixpkgs.follows = "nixpkgs";
10 };
11
12 vscode-server.url = "github:nix-community/nixos-vscode-server";
13 agenix.url = "github:ryantm/agenix";
14 zen-browser = {
15 url = "github:0xc000022070/zen-browser-flake";
16 inputs.nixpkgs.follows = "nixpkgs";
17 };
18
19 catppuccin.url = "github:catppuccin/nix";
20 home-manager = {
21 url = "github:nix-community/home-manager";
22 inputs.nixpkgs.follows = "nixpkgs";
23 };
24 };
25
26 outputs =
27 { self, ... }@inputs:
28 with inputs;
29 let
30 nixosModules = builtins.listToAttrs (
31 map (module: {
32 name = module;
33 value = import (./modules + "/${module}");
34 }) (builtins.attrNames (builtins.readDir ./modules))
35 );
36 in
37 {
38 nixosConfigurations = {
39 focalor = nixpkgs.lib.nixosSystem {
40 system = "x86_64-linux";
41 specialArgs = {
42 inherit inputs;
43 system = "x86_64-linux";
44 };
45 modules = [
46 ./hosts/focalor
47 lix-module.nixosModules.default
48
49 vscode-server.nixosModules.default
50 agenix.nixosModules.default
51
52 catppuccin.nixosModules.catppuccin
53
54 home-manager.nixosModules.home-manager
55 {
56 home-manager.useGlobalPkgs = true;
57 home-manager.backupFileExtension = "HMBackup";
58 home-manager.users.regent.imports = [
59 ./home/regent/home.nix
60 catppuccin.homeModules.catppuccin
61 ];
62 home-manager.extraSpecialArgs = {
63 inherit inputs;
64 system = "x86_64-linux";
65 };
66 }
67 ];
68 };
69
70 valefar = nixpkgs.lib.nixosSystem {
71 system = "x86_64-linux";
72 specialArgs = {
73 inherit inputs;
74 system = "x86_64-linux";
75 };
76 modules = [
77 ./hosts/valefar
78 lix-module.nixosModules.default
79
80 vscode-server.nixosModules.default
81 agenix.nixosModules.default
82
83 { imports = builtins.attrValues nixosModules; }
84 ];
85 };
86
87 buer = nixpkgs.lib.nixosSystem {
88 system = "x86_64-linux";
89 specialArgs = {
90 inherit inputs;
91 system = "x86_64-linux";
92 };
93 modules = [
94 ./hosts/buer
95
96 agenix.nixosModules.default
97 ];
98 };
99
100 morax = nixpkgs.lib.nixosSystem {
101 system = "aarch64-linux";
102 specialArgs = {
103 inherit inputs;
104 system = "aarch64-linux";
105 };
106 modules = [
107 ./hosts/morax
108 nixos-hardware.nixosModules.raspberry-pi-4
109
110 agenix.nixosModules.default
111 ];
112 };
113
114
115 # Easy to add more hosts
116 /*
117 server2 = nixpkgs.lib.nixosSystem {
118 system = "x86_64-linux";
119 modules = [
120 ./hosts/server2
121 agenix.nixosModules.default
122 # different services for server2
123 ];
124 };
125 */
126 };
127 };
128}