docs: add metronom to deploy docs, style: format
Some checks failed
Flake checks / Check (pull_request) Failing after 2m14s

This commit is contained in:
teutat3s 2024-05-25 17:25:45 +02:00
parent b8db97a604
commit 98dc6e0e13
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1
2 changed files with 35 additions and 17 deletions

View file

@ -10,13 +10,19 @@ Then, run `deploy-rs` with the hostname of the server you want to deploy:
For nachtigall.pub.solar:
```
deploy --targets '.#nachtigall' --magic-rollback false --auto-rollback false
deploy --targets '.#nachtigall' --magic-rollback false --auto-rollback false --keep-result --result-path ./results
```
For flora-6.pub.solar:
```
deploy --targets '.#flora-6' --magic-rollback false --auto-rollback false
deploy --targets '.#flora-6' --magic-rollback false --auto-rollback false --keep-result --result-path ./results
```
For metronom.pub.solar (aarch64-linux):
```
deploy --targets '.#metronom' --magic-rollback false --auto-rollback false --keep-result --result-path ./results --remote-build
```
Usually we skip all rollback functionality, but if you want to deploy a change
@ -28,6 +34,11 @@ deployment, add the flag `--skip-checks` at the end of the command.
`--dry-activate` can be used to only put all files in place without switching,
to enable switching to the new config quickly at a later moment.
We use `--keep-result --result-path ./results` to keep the last `result`
symlink of each `deploy` from being garbage collected. That way, we keep builds
cached in the Nix store. This is optional and both flags can be removed if disk
space is a scarce resource on your machine.
You'll need to have SSH Access to the boxes to be able to run `deploy`.
### Getting SSH access

View file

@ -51,23 +51,30 @@ in
*/
lib.recursiveUpdate (lib.mapAttrs (_: c: {
hostname = getFqdn c;
profiles.system = let
system = c.pkgs.system;
profiles.system =
let
system = c.pkgs.system;
# Unmodified nixpkgs
pkgs = import inputs.nixpkgs { inherit system; };
# Unmodified nixpkgs
pkgs = import inputs.nixpkgs { inherit system; };
# nixpkgs with deploy-rs overlay but force the nixpkgs package
deployPkgs = import inputs.nixpkgs {
inherit system;
overlays = [
inputs.deploy-rs.overlay # or deploy-rs.overlays.default
(self: super: { deploy-rs = { inherit (pkgs) deploy-rs; lib = super.deploy-rs.lib; }; })
];
# nixpkgs with deploy-rs overlay but force the nixpkgs package
deployPkgs = import inputs.nixpkgs {
inherit system;
overlays = [
inputs.deploy-rs.overlay # or deploy-rs.overlays.default
(self: super: {
deploy-rs = {
inherit (pkgs) deploy-rs;
lib = super.deploy-rs.lib;
};
})
];
};
in
{
user = "root";
path = deployPkgs.deploy-rs.lib.activate.nixos c;
};
in {
user = "root";
path = deployPkgs.deploy-rs.lib.activate.nixos c;
};
}) systemConfigurations) extraConfig;
}