diff --git a/flake.nix b/flake.nix index 1dd0f66..208c21f 100644 --- a/flake.nix +++ b/flake.nix @@ -3,6 +3,8 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; + deploy-rs.url = "github:serokell/deploy-rs"; + deploy-rs.inputs.nixpkgs.follows = "nixpkgs"; disko.url = "github:nix-community/disko"; disko.inputs.nixpkgs.follows = "nixpkgs"; home-manager.url = "github:nix-community/home-manager/release-24.11"; @@ -21,7 +23,7 @@ }; }; - outputs = { self, nixpkgs, home-manager, disko, nixvim, ...}: + outputs = { self, nixpkgs, home-manager, deploy-rs, disko, nixvim, ...}: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; @@ -77,5 +79,16 @@ }; }; }; + deploy.nodes.tien = let + hostname = "tien"; + in { + hostname = hostname; + profiles.system = { + sshUser = "root"; + path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.${hostname}; + }; + }; + + checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib; }; }