33 lines
843 B
Nix
33 lines
843 B
Nix
{ self, inputs, ... }: {
|
|
flake.wrappers.test-push = inputs.wrappers.lib.wrapModule ({config, lib, wlib, ... }: {
|
|
options = {
|
|
flakeDir = lib.mkOption {
|
|
type = lib.types.str;
|
|
};
|
|
host = lib.mkOption {
|
|
type = lib.types.str;
|
|
};
|
|
target = lib.mkOption {
|
|
type = lib.types.str;
|
|
};
|
|
sshUser = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "root";
|
|
};
|
|
elevationStrategy = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "none";
|
|
};
|
|
};
|
|
|
|
config = {
|
|
binName = "test-push";
|
|
package = config.pkgs.nh;
|
|
args = [
|
|
"os" "switch" "${config.flakeDir}#${config.host}"
|
|
"--target-host" "${config.sshUser}@${config.target}"
|
|
"--elevation-strategy" "${config.elevationStrategy}"
|
|
];
|
|
};
|
|
});
|
|
} |