mirror of
https://github.com/SebastianWendel/srx-platform-nix.git
synced 2024-09-19 20:09:02 +02:00
28 lines
616 B
Nix
28 lines
616 B
Nix
|
{ inputs, ... }:
|
||
|
let
|
||
|
inherit (inputs) self deploy-rs nixpkgs;
|
||
|
inherit (nixpkgs) lib;
|
||
|
|
||
|
genNode =
|
||
|
hostName: nixosCfg:
|
||
|
let
|
||
|
inherit (self.hosts.${hostName}) address hostPlatform remoteBuild;
|
||
|
inherit (deploy-rs.lib.${hostPlatform}) activate;
|
||
|
in
|
||
|
{
|
||
|
inherit remoteBuild;
|
||
|
hostname = address;
|
||
|
profiles.system.path = activate.nixos nixosCfg;
|
||
|
};
|
||
|
in
|
||
|
{
|
||
|
flake.deploy = {
|
||
|
# autoRollback = true;
|
||
|
# magicRollback = true;
|
||
|
autoRollback = false;
|
||
|
magicRollback = false;
|
||
|
user = "root";
|
||
|
nodes = lib.mapAttrs genNode (self.nixosConfigurations or { });
|
||
|
};
|
||
|
}
|