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 = inputs@{ self, nixpkgs, lix-module, vscode-server, agenix, zen-browser, catppuccin, home-manager, ... }: {
25 nixosConfigurations = {
26 focalor = nixpkgs.lib.nixosSystem {
27 system = "x86_64-linux";
28 specialArgs = { inherit inputs; system = "x86_64-linux"; };
29 modules = [
30 ./hosts/focalor
31 lix-module.nixosModules.default
32
33 vscode-server.nixosModules.default
34 agenix.nixosModules.default
35
36 ({ config, pkgs, ... }: {
37 services.vscode-server.enable = true;
38 services.vscode-server.nodejsPackage = pkgs.nodejs_20;
39 environment.systemPackages = [ agenix.packages.x86_64-linux.default ];
40 })
41
42 catppuccin.nixosModules.catppuccin
43
44 home-manager.nixosModules.home-manager {
45 home-manager.useGlobalPkgs = true;
46 home-manager.backupFileExtension = "HMBackup";
47 home-manager.users.regent.imports = [
48 ./home/regent/home.nix
49 catppuccin.homeManagerModules.catppuccin
50 ];
51 home-manager.extraSpecialArgs = { inherit inputs; system = "x86_64-linux";};
52 }
53 ];
54 };
55
56 valefar = nixpkgs.lib.nixosSystem {
57 system = "x86_64-linux";
58 modules = [
59 ./hosts/valefar # imports configuration.nix automatically
60 lix-module.nixosModules.default
61
62 # External modules
63 vscode-server.nixosModules.default
64 agenix.nixosModules.default
65
66 # Global external module config
67 ({ config, pkgs, ... }: {
68 services.vscode-server.enable = true;
69 services.vscode-server.nodejsPackage = pkgs.nodejs_20;
70 environment.systemPackages = [ agenix.packages.x86_64-linux.default ];
71 })
72 ];
73 };
74
75 # Easy to add more hosts
76 /*server2 = nixpkgs.lib.nixosSystem {
77 system = "x86_64-linux";
78 modules = [
79 ./hosts/server2
80 agenix.nixosModules.default
81 # different services for server2
82 ];
83 };*/
84 };
85 };
86}