flake: add "applications" to deploy to moby
This commit is contained in:
16
flake.nix
16
flake.nix
@@ -198,6 +198,11 @@
|
|||||||
apps."x86_64-linux" =
|
apps."x86_64-linux" =
|
||||||
let
|
let
|
||||||
pkgs = self.legacyPackages."x86_64-linux";
|
pkgs = self.legacyPackages."x86_64-linux";
|
||||||
|
deployScript = action: pkgs.writeShellScript "deploy-moby" ''
|
||||||
|
nixos-rebuild --flake '.#cross-moby' build
|
||||||
|
sudo nix sign-paths -r -k /run/secrets/nix_serve_privkey $(readlink ./result)
|
||||||
|
nixos-rebuild --flake '.#cross-moby' ${action} --target-host colin@moby --use-remote-sudo
|
||||||
|
'';
|
||||||
in {
|
in {
|
||||||
update-feeds = {
|
update-feeds = {
|
||||||
type = "app";
|
type = "app";
|
||||||
@@ -209,6 +214,17 @@
|
|||||||
type = "app";
|
type = "app";
|
||||||
program = "${pkgs.feeds.passthru.initFeedScript}";
|
program = "${pkgs.feeds.passthru.initFeedScript}";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
deploy-moby-test = {
|
||||||
|
# `nix run '.#deploy-moby-test'`
|
||||||
|
type = "app";
|
||||||
|
program = ''${deployScript "test"}'';
|
||||||
|
};
|
||||||
|
deploy-moby-switch = {
|
||||||
|
# `nix run '.#deploy-moby-switch'`
|
||||||
|
type = "app";
|
||||||
|
program = ''${deployScript "switch"}'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
templates = {
|
templates = {
|
||||||
|
Reference in New Issue
Block a user