| # SPDX-FileCopyrightText: 2024 Auxolotl Infrastructure Contributors |
| # SPDX-FileCopyrightText: 2024 Clicks Codes |
| # SPDX-License-Identifier: GPL-3.0-only |
| inherit (inputs) deploy-rs; |
| ## Create deployment configuration for use with deploy-rs. |
| ## my-host.system.sudo = "doas -u"; |
| #@ { self: Flake, overrides: Attrs ? {} } -> Attrs |
| hosts = self.nixosConfigurations or { }; |
| names = builtins.attrNames hosts; |
| user = host.config.users.infra or null; |
| inherit (host.pkgs) system; |
| ${name} = (overrides.${name} or { }) // { |
| hostname = overrides.${name}.hostname or "${name}"; |
| profiles = (overrides.${name}.profiles or { }) // { |
| (overrides.${name}.profiles.system or { }) |
| path = deploy-rs.lib.${system}.activate.nixos host; |
| // lib.optionalAttrs host.config.clicks.security.doas.enable { sudo = "doas -u"; }; |