From e8e186a6f3ea649b31544b9a0636c377856e96f2 Mon Sep 17 00:00:00 2001 From: Johannes Rothe Date: Sun, 22 Dec 2024 23:11:45 +0100 Subject: [PATCH] flake: add deploy target for tien --- flake.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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; }; }