Skip to content

Commit

Permalink
fixup! feat(apps-{deploy,git-push,ssh}): refine and add -all variants…
Browse files Browse the repository at this point in the history
… for mass deployment
  • Loading branch information
steveej committed Oct 4, 2024
1 parent 75707fb commit 60fd285
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions modules/flake-parts/apps.deploy-/darwin.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# populates apps.{system}.git-deploy-... for all darwin hosts
# populates apps.{system}.deploy-... for all darwin hosts
{ self, lib, ... }:
{
perSystem =
Expand All @@ -10,7 +10,7 @@
hostName,
deployUser,
}:
pkgs.writeShellScript "git-deploy-${hostName}" ''
pkgs.writeShellScript "deploy-${hostName}" ''
set -Eeo pipefail
export PATH="${
lib.makeBinPath (
Expand Down Expand Up @@ -38,7 +38,7 @@

mkDarwinDeployApp =
attrName: config:
lib.nameValuePair "git-deploy-${attrName}" {
lib.nameValuePair "deploy-${attrName}" {
type = "app";
program = builtins.toString (mkDarwinDeploy {
inherit attrName;
Expand All @@ -50,10 +50,10 @@
in
{
config.apps = individual // {
git-deploy-darwin-all = {
deploy-darwin-all = {
type = "app";
program = builtins.toString (
pkgs.writeShellScript "git-deploy-all" (
pkgs.writeShellScript "deploy-all" (
builtins.concatStringsSep "\n" (
lib.mapAttrsToList (name: value: ''
echo \# ${name}: running ${value.program} ''${@}
Expand Down
6 changes: 3 additions & 3 deletions modules/flake-parts/apps.deploy-/linux.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# populates apps.{system}.git-deploy-... for all linux hosts
# populates apps.{system}.deploy-... for all linux hosts
{ self, lib, ... }:
{
perSystem =
{ pkgs, ... }:
let
prefix = "git-deploy-";
prefixDirect = "git-deploy-direct";
prefix = "deploy-";
prefixDirect = "deploy-direct";
mkLinuxDeploy =
{ attrName, hostName }:
pkgs.writeShellScript "${prefix}${hostName}" ''
Expand Down

0 comments on commit 60fd285

Please sign in to comment.