my nix configs for my servers and desktop
1# flake.nix 2{ 3 inputs = { 4 nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; 5 vscode-server.url = "github:nix-community/nixos-vscode-server"; 6 agenix.url = "github:ryantm/agenix"; 7 }; 8 9 outputs = { self, nixpkgs, vscode-server, agenix }: { 10 nixosConfigurations = { 11 valefar = nixpkgs.lib.nixosSystem { 12 system = "x86_64-linux"; 13 modules = [ 14 ./hosts/valefar # imports configuration.nix automatically 15 16 # External modules 17 vscode-server.nixosModules.default 18 agenix.nixosModules.default 19 20 # Global external module config 21 ({ config, pkgs, ... }: { 22 services.vscode-server.enable = true; 23 services.vscode-server.nodejsPackage = pkgs.nodejs_20; 24 environment.systemPackages = [ agenix.packages.x86_64-linux.default ]; 25 }) 26 ]; 27 }; 28 29 # Easy to add more hosts 30 /*server2 = nixpkgs.lib.nixosSystem { 31 system = "x86_64-linux"; 32 modules = [ 33 ./hosts/server2 34 agenix.nixosModules.default 35 # different services for server2 36 ]; 37 };*/ 38 }; 39 }; 40}