summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorLeonardo Santiago <[email protected]>2024-11-12 18:52:26 -0300
committerLeonardo Santiago <[email protected]>2024-11-12 18:52:26 -0300
commitc5d18a901f615cca76cfbf95f75a38e7631e5cd5 (patch)
treefae7fc8ee8a72eab1af553339dee0fc61f142292 /flake.nix
parentc49c5e8e9086e68010c45b65196b8669f106dbf9 (diff)
use deploy-rs
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix14
1 files changed, 12 insertions, 2 deletions
diff --git a/flake.nix b/flake.nix
index 2899522..682cbb4 100644
--- a/flake.nix
+++ b/flake.nix
@@ -18,9 +18,10 @@
flake = false;
};
mixrank.url = "git+ssh://[email protected]/mixrank/mixrank";
+ deploy-rs.url = "github:serokell/deploy-rs";
};
- outputs = { self, nixpkgs, ... } @ inputs : let
+ outputs = { self, nixpkgs, deploy-rs, ... } @ inputs : let
inherit (builtins) readDir attrNames listToAttrs split head;
modules = map (p: ./modules/${p}) (attrNames (readDir ./modules));
make-config-named = host: nixpkgs.lib.nixosSystem {
@@ -33,7 +34,16 @@
get-basename = n: head (split "\\." n);
hosts-names = map get-basename (attrNames (readDir ./hosts));
nixos-configs = map (h: { name= h; value = make-config-named h;}) hosts-names;
- in {
+ in rec {
nixosConfigurations = listToAttrs nixos-configs;
+ deploy.nodes.iori = {
+ hostname = "ssh.santi.net.br";
+ remoteBuild = true;
+ interactiveSudo = true;
+ profiles.system = {
+ user = "root";
+ path = deploy-rs.lib.aarch64-linux.activate.nixos nixosConfigurations.iori;
+ };
+ };
};
}