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
18 outputs = { self, nixpkgs, lix-module, vscode-server, agenix, zen-browser } @ inputs: {
19 nixosConfigurations = {
20 focalor = nixpkgs.lib.nixosSystem {
21 system = "x86_64-linux";
22 specialArgs = { inherit inputs; system = "x86_64-linux"; };
23 modules = [
24 ./hosts/focalor
25 lix-module.nixosModules.default
26
27 vscode-server.nixosModules.default
28 agenix.nixosModules.default
29
30 ({ config, pkgs, ... }: {
31 services.vscode-server.enable = true;
32 services.vscode-server.nodejsPackage = pkgs.nodejs_20;
33 environment.systemPackages = [ agenix.packages.x86_64-linux.default ];
34 })
35 ];
36 };
37
38 valefar = nixpkgs.lib.nixosSystem {
39 system = "x86_64-linux";
40 modules = [
41 ./hosts/valefar # imports configuration.nix automatically
42 lix-module.nixosModules.default
43
44 # External modules
45 vscode-server.nixosModules.default
46 agenix.nixosModules.default
47
48 # Global external module config
49 ({ config, pkgs, ... }: {
50 services.vscode-server.enable = true;
51 services.vscode-server.nodejsPackage = pkgs.nodejs_20;
52 environment.systemPackages = [ agenix.packages.x86_64-linux.default ];
53 })
54 ];
55 };
56
57 # Easy to add more hosts
58 /*server2 = nixpkgs.lib.nixosSystem {
59 system = "x86_64-linux";
60 modules = [
61 ./hosts/server2
62 agenix.nixosModules.default
63 # different services for server2
64 ];
65 };*/
66 };
67 };
68}