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