fix path to deploy in apps

This commit is contained in:
Tim Schubert 2022-08-24 00:27:46 +02:00
parent 8a057c3cdf
commit c2ec59d1cb
Signed by: dadada
GPG key ID: EEB8D1CE62C4DFEA
2 changed files with 7 additions and 3 deletions

View file

@ -1,4 +1,8 @@
{ pkgs, ... }: { pkgs
, deploy-rs
, system
, ...
}:
{ {
nixos-switch = { nixos-switch = {
type = "app"; type = "app";
@ -14,7 +18,7 @@
program = toString (pkgs.writeScript "self-deploy" '' program = toString (pkgs.writeScript "self-deploy" ''
#!${pkgs.runtimeShell} #!${pkgs.runtimeShell}
flake=$(nix flake metadata --json ${./.} | jq -r .url) flake=$(nix flake metadata --json ${./.} | jq -r .url)
deploy ''${flake} ${deploy-rs.apps."${system}".deploy-rs.program} ''${flake}
''); '');
}; };
} }

View file

@ -20,7 +20,7 @@
formatter = self.formatter.${system}; formatter = self.formatter.${system};
in in
{ {
apps = import ./apps.nix { inherit pkgs; }; apps = import ./apps.nix (inputs // { inherit pkgs system; });
devShells.default = pkgs.callPackage ./dev-shell.nix inputs // { inherit pkgs system; }; devShells.default = pkgs.callPackage ./dev-shell.nix inputs // { inherit pkgs system; };