add app nixos-switch
This commit is contained in:
parent
d1c7a721cc
commit
9b01699b0c
1 changed files with 8 additions and 0 deletions
|
@ -17,6 +17,14 @@
|
|||
selfPkgs = self.packages.${system};
|
||||
in
|
||||
{
|
||||
apps.nixos-switch = {
|
||||
type = "app";
|
||||
program = toString (pkgs.writeScript "deploy" ''
|
||||
#!${pkgs.runtimeShell}
|
||||
flake=$(nix flake metadata --json ${./.} | jq -r .url)
|
||||
nixos-rebuild switch --flake ".#$1" --use-remote-sudo
|
||||
'');
|
||||
};
|
||||
apps.deploy = {
|
||||
type = "app";
|
||||
program = toString (pkgs.writeScript "deploy" ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue