mirror of
https://github.com/lightly-toasted/nix-config.git
synced 2025-12-10 03:49:44 +00:00
feat: add deploy scripts
This commit is contained in:
parent
ac228ac385
commit
1939b8ec48
5 changed files with 19 additions and 14 deletions
20
flake.nix
20
flake.nix
|
|
@ -89,20 +89,12 @@
|
|||
pkgs.sops
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
HOST=$(hostname)
|
||||
deploy-nixos() {
|
||||
sudo nixos-rebuild switch --flake .#$HOST "$@"
|
||||
}
|
||||
|
||||
deploy-vps() {
|
||||
nixos-rebuild switch --flake .#vps --target-host root@vps "$@"
|
||||
}
|
||||
|
||||
deploy-home() {
|
||||
home-manager switch --flake .#$USER@$HOST
|
||||
}
|
||||
'';
|
||||
packages = [
|
||||
(pkgs.symlinkJoin {
|
||||
name = "deploy-bin";
|
||||
paths = [ ./bin ];
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue