{"id":16345693,"url":"https://github.com/defelo/deploy-sh","last_synced_at":"2025-07-12T02:38:59.170Z","repository":{"id":190841374,"uuid":"683429401","full_name":"Defelo/deploy-sh","owner":"Defelo","description":"Simple NixOS remote deployment tool","archived":false,"fork":false,"pushed_at":"2024-12-06T13:08:06.000Z","size":39,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-04-19T11:54:15.113Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Defelo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-08-26T14:49:03.000Z","updated_at":"2024-12-06T13:08:10.000Z","dependencies_parsed_at":"2023-11-23T09:24:37.319Z","dependency_job_id":"d18b7a72-36c6-417f-9316-277107f969ec","html_url":"https://github.com/Defelo/deploy-sh","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":"0.11111111111111116","last_synced_commit":"59db3f6725c63ed70b80fd5403165c89203b5de5"},"previous_names":["defelo/deploy-sh"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Defelo/deploy-sh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Defelo%2Fdeploy-sh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Defelo%2Fdeploy-sh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Defelo%2Fdeploy-sh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Defelo%2Fdeploy-sh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Defelo","download_url":"https://codeload.github.com/Defelo/deploy-sh/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Defelo%2Fdeploy-sh/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264926332,"owners_count":23684320,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T00:32:58.636Z","updated_at":"2025-07-12T02:38:58.891Z","avatar_url":"https://github.com/Defelo.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deploy-sh\nSimple NixOS remote deployment tool\n\n## Flake Setup\n\u003cdetails\u003e\n  \u003csummary\u003e\n    \u003cb\u003e1.\u003c/b\u003e Add a \u003ccode\u003edeploy-sh.hosts\u003c/code\u003e output to your \u003ccode\u003eflake.nix\u003c/code\u003e. This has to be an attribute set of NixOS systems.\n  \u003c/summary\u003e\n\n  ```nix\n  {\n    outputs = {self, nixpkgs, ...}: {\n      nixosConfigurations = {\n        foo = nixpkgs.lib.nixosSystem { ... };\n        bar = nixpkgs.lib.nixosSystem { ... };\n        baz = nixpkgs.lib.nixosSystem { ... };\n      };\n      deploy-sh.hosts = self.nixosConfigurations;\n    };\n  }\n  ```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n    \u003cb\u003e2.\u003c/b\u003e Import and configure the \u003ccode\u003edeploy-sh\u003c/code\u003e NixOS module.\n  \u003c/summary\u003e\n\n  ```nix\n  {\n    inputs = {\n      deploy-sh.url = \"github:Defelo/deploy-sh\";\n    };\n    outputs = {self, nixpkgs, deploy-sh, ...}: {\n      nixosConfigurations.foo = nixpkgs.lib.nixosSystem {\n        # ...\n        modules = [\n          # ...\n          deploy-sh.nixosModules.default\n          {\n            deploy-sh.targetHost = \"root@10.13.37.2\";\n          }\n        ];\n      };\n      deploy-sh.hosts = self.nixosConfigurations;\n    };\n  }\n  ```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n    \u003cb\u003e3.\u003c/b\u003e To be able to use the \u003ccode\u003edeploy\u003c/code\u003e command, add \u003ccode\u003edeploy-sh\u003c/code\u003e to your dev shell.\n  \u003c/summary\u003e\n\n  ```nix\n  {\n    inputs = {\n      deploy-sh = \"github:Defelo/deploy-sh\";\n    };\n    outputs = {self, nixpkgs, deploy-sh, ...}: let\n      system = \"x86_64-linux\";\n      pkgs = import nixpkgs {inherit system;};\n    in {\n      devShells.${system}.default = pkgs.mkShell {\n        packages = [\n          deploy-sh.packages.${system}.default\n        ];\n      };\n    };\n  }\n  ```\n\u003c/details\u003e\n\n## NixOS Module Options\nSee [flake.nix](https://github.com/Defelo/deploy-sh/blob/develop/flake.nix#L48-L77)\n\n## Usage\n```\n$ nix develop  # if you are not using direnv\n$ deploy --help\nSimple NixOS remote deployment tool (https://github.com/Defelo/deploy-sh)\n\nUsage: deploy [OPTIONS] [HOSTS]...\n\nFor each host, only the most recent options to its left are taken into account. For\nexample, `deploy --local foo bar --remote baz` will build hosts foo and bar locally,\nand only baz on a remote build host.\nAll hosts are deployed if no host is specified explicitly.\n\nActivation options:\n  --switch        Build and activate the new configuration, and make it the boot default. (default)\n  --boot          Build the new configuration and make it the boot default, but do not activate it.\n  --test          Build and activate the new configuration, but do not add it to the boot menu.\n  --dry-activate  Build the new configuration, but do not activate it.\n  --reboot        Build the new configuration, make it the boot default and reboot into the new system.\n  --eval          Evaluate the new configuration, but neither build nor activate it.\n\nDiff options:\n  --diff          Display differences between the current and new configuration\n  --no-diff       Don't display differences between the current and new configuration.\n  --nvd           Display package differences between the current and new configuration. (default)\n  --no-nvd        Don't display package differences between the current and new configuration.\n\nHost options:\n  --local         Build the configuration locally and copy the new system to the target host.\n  --remote        Build the configuration on the remote build host.\n  --build-host    Set the host to build the configuration on.\n  --target-host   Set the host to deploy the system on.\n\nBuild options:\n  --cache         Set a path on the build host where to store a symlink to the new system to avoid garbage collection.\n  --no-cache      Don't store a symlink to the new system on the build host.\n  --fetch         Copy the current system of the target host to the build host before building.\n  --no-fetch      Don't copy the current system of the target host to the build host before building. (default)\n\nOptions:\n  -h  --help      Print help\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefelo%2Fdeploy-sh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefelo%2Fdeploy-sh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefelo%2Fdeploy-sh/lists"}