up
This commit is contained in:
@@ -4,6 +4,12 @@
|
|||||||
system,
|
system,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
descriptions = {
|
||||||
|
apply = "Build and apply configuration";
|
||||||
|
build = "Build configuration";
|
||||||
|
build-switch = "Build and switch configuration";
|
||||||
|
rollback = "Rollback to previous generation";
|
||||||
|
};
|
||||||
mkApp = name: {
|
mkApp = name: {
|
||||||
type = "app";
|
type = "app";
|
||||||
program = "${(pkgs.writeShellScriptBin name ''
|
program = "${(pkgs.writeShellScriptBin name ''
|
||||||
@@ -11,6 +17,7 @@
|
|||||||
echo "Running ${name} for ${system}"
|
echo "Running ${name} for ${system}"
|
||||||
exec ${inputs.self}/apps/${system}/${name} "$@"
|
exec ${inputs.self}/apps/${system}/${name} "$@"
|
||||||
'')}/bin/${name}";
|
'')}/bin/${name}";
|
||||||
|
meta.description = descriptions.${name};
|
||||||
};
|
};
|
||||||
appNames = ["apply" "build" "build-switch" "rollback"];
|
appNames = ["apply" "build" "build-switch" "rollback"];
|
||||||
in {
|
in {
|
||||||
@@ -20,6 +27,7 @@
|
|||||||
deploy = {
|
deploy = {
|
||||||
type = "app";
|
type = "app";
|
||||||
program = "${inputs.deploy-rs.packages.${system}.deploy-rs}/bin/deploy";
|
program = "${inputs.deploy-rs.packages.${system}.deploy-rs}/bin/deploy";
|
||||||
|
meta.description = "Deploy to NixOS hosts via deploy-rs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -23,10 +23,18 @@
|
|||||||
command = "/nix/store/*/bin/activate-rs";
|
command = "/nix/store/*/bin/activate-rs";
|
||||||
options = ["NOPASSWD"];
|
options = ["NOPASSWD"];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
command = "/nix/store/*/activate-rs";
|
||||||
|
options = ["NOPASSWD"];
|
||||||
|
}
|
||||||
{
|
{
|
||||||
command = "/nix/store/*/bin/wait-activate";
|
command = "/nix/store/*/bin/wait-activate";
|
||||||
options = ["NOPASSWD"];
|
options = ["NOPASSWD"];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
command = "/nix/store/*/wait-activate";
|
||||||
|
options = ["NOPASSWD"];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user