flake: fix deploy so the -light and -test variants work
This commit is contained in:
20
flake.nix
20
flake.nix
@@ -269,6 +269,10 @@
|
|||||||
# let the user handle that edge case by re-running this whole command
|
# let the user handle that edge case by re-running this whole command
|
||||||
nixos-rebuild --flake '.#${host}' ${action} --target-host colin@${addr} --use-remote-sudo $@
|
nixos-rebuild --flake '.#${host}' ${action} --target-host colin@${addr} --use-remote-sudo $@
|
||||||
'';
|
'';
|
||||||
|
deployApp = host: addr: action: {
|
||||||
|
type = "app";
|
||||||
|
program = ''${deployScript host addr action}'';
|
||||||
|
};
|
||||||
|
|
||||||
# pkg updating.
|
# pkg updating.
|
||||||
# a cleaner alternative lives here: <https://discourse.nixos.org/t/how-can-i-run-the-updatescript-of-personal-packages/25274/2>
|
# a cleaner alternative lives here: <https://discourse.nixos.org/t/how-can-i-run-the-updatescript-of-personal-packages/25274/2>
|
||||||
@@ -357,14 +361,14 @@
|
|||||||
program = "${pkgs.feeds.init-feed}";
|
program = "${pkgs.feeds.init-feed}";
|
||||||
};
|
};
|
||||||
|
|
||||||
deploy = pkgs.lib.mapAttrs (host: _: {
|
deploy = {
|
||||||
type = "app";
|
lappy = deployApp "lappy" "lappy" "switch";
|
||||||
program = ''${deployScript host host "switch"}'';
|
lappy-light = deployApp "lappy-light" "lappy" "switch";
|
||||||
test = {
|
moby = deployApp "moby" "moby" "switch";
|
||||||
type = "app";
|
moby-light = deployApp "moby-light" "moby" "switch";
|
||||||
program = ''${deployScript host host "test"}'';
|
moby-test = deployApp "moby" "moby" "test";
|
||||||
};
|
servo = deployApp "servo" "servo" "switch";
|
||||||
}) self.nixosConfigurations;
|
};
|
||||||
|
|
||||||
sync-moby = {
|
sync-moby = {
|
||||||
# copy music from the current device to moby
|
# copy music from the current device to moby
|
||||||
|
Reference in New Issue
Block a user