diff options
| author | seth <[email protected]> | 2023-08-24 03:48:54 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-08-24 04:21:43 -0400 |
| commit | 7cbaaa0445e7c49818acf6a30c8bd8e0a62d21c6 (patch) | |
| tree | 79127c62a4bb4738acd155d136eaac08b3292e4c | |
| parent | af6a211d9a763b87b62062ae60826ef88967b3e8 (diff) | |
lib/mkDeployNodes: add darwin support
| -rw-r--r-- | parts/deploy.nix | 8 | ||||
| -rw-r--r-- | parts/lib/utils.nix | 6 |
2 files changed, 11 insertions, 3 deletions
diff --git a/parts/deploy.nix b/parts/deploy.nix index dbb1cc3..725c322 100644 --- a/parts/deploy.nix +++ b/parts/deploy.nix @@ -3,9 +3,13 @@ lib, ... }: let - targets = ["atlas" "p-body"]; + inherit (builtins) elem; + inherit (lib) filterAttrs; + inherit (self) darwinConfigurations nixosConfigurations; - targets' = lib.filterAttrs (n: _: builtins.elem n targets) self.nixosConfigurations; + targets = ["atlas" "p-body" "caroline"]; + + targets' = filterAttrs (n: _: elem n targets) (nixosConfigurations // darwinConfigurations); in { flake.deploy = { remoteBuild = true; diff --git a/parts/lib/utils.nix b/parts/lib/utils.nix index 4473e22..7e3109f 100644 --- a/parts/lib/utils.nix +++ b/parts/lib/utils.nix @@ -15,9 +15,13 @@ in { mkDeployNodes = builtins.mapAttrs (_: system: let inherit (deployPkgs system.pkgs) deploy-rs; + type = + if system.pkgs.stdenv.isLinux + then "nixos" + else "darwin"; in { sshUser = "root"; hostname = system.config.networking.hostName; - profiles.system.path = deploy-rs.lib.activate.nixos system; + profiles.system.path = deploy-rs.lib.activate.${type} system; }); } |
