46 lines
1.3 KiB
Nix
46 lines
1.3 KiB
Nix
# flake.nix
|
|
{
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
|
lix-module = {
|
|
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.0.tar.gz";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
vscode-server.url = "github:nix-community/nixos-vscode-server";
|
|
agenix.url = "github:ryantm/agenix";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, lix-module, vscode-server, agenix }: {
|
|
nixosConfigurations = {
|
|
valefar = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
./hosts/valefar # imports configuration.nix automatically
|
|
lix-module.nixosModules.default
|
|
|
|
# External modules
|
|
vscode-server.nixosModules.default
|
|
agenix.nixosModules.default
|
|
|
|
# Global external module config
|
|
({ config, pkgs, ... }: {
|
|
services.vscode-server.enable = true;
|
|
services.vscode-server.nodejsPackage = pkgs.nodejs_20;
|
|
environment.systemPackages = [ agenix.packages.x86_64-linux.default ];
|
|
})
|
|
];
|
|
};
|
|
|
|
# Easy to add more hosts
|
|
/*server2 = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
./hosts/server2
|
|
agenix.nixosModules.default
|
|
# different services for server2
|
|
];
|
|
};*/
|
|
};
|
|
};
|
|
}
|