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