diff options
author | Leonardo Santiago <[email protected]> | 2024-11-12 18:52:26 -0300 |
---|---|---|
committer | Leonardo Santiago <[email protected]> | 2024-11-12 18:52:26 -0300 |
commit | c5d18a901f615cca76cfbf95f75a38e7631e5cd5 (patch) | |
tree | fae7fc8ee8a72eab1af553339dee0fc61f142292 /flake.nix | |
parent | c49c5e8e9086e68010c45b65196b8669f106dbf9 (diff) |
use deploy-rs
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -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; + }; + }; }; } |