nixos/flake.nix

37 lines
937 B
Nix
Raw Normal View History

2023-01-12 21:10:17 +00:00
{
description = "Deployment for skynet";
inputs = {
# gonna start off with a fairly modern base
nixpkgs.url = "nixpkgs/nixos-23.05";
# utility stuff
flake-utils.url = "github:numtide/flake-utils";
agenix.url = "github:ryantm/agenix";
deploy-rs.url = "github:serokell/deploy-rs";
};
outputs = { self, nixpkgs, deploy-rs }: {
nixosConfigurations.some-random-system = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./machines/base.nix
2023-01-12 21:10:17 +00:00
];
};
deploy.nodes.example = {
hostname = "192.168.1.157";
profiles.system = {
2023-01-12 21:10:17 +00:00
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.some-random-system;
user = "root";
};
2023-01-12 21:10:17 +00:00
};
# This is highly advised, and will prevent many possible mistakes
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
};
}