2021-03-19 20:28:24 +00:00
|
|
|
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2021-04-10 19:59:56 +00:00
|
|
|
{ depot, lib, ... }:
|
2021-03-28 12:26:11 +00:00
|
|
|
{
|
2021-03-19 20:28:24 +00:00
|
|
|
imports = [
|
2021-03-28 12:26:11 +00:00
|
|
|
../lib/bvm.nix
|
2021-04-10 17:20:35 +00:00
|
|
|
../../../nix/pkgs/rundeck-bin/module.nix
|
2021-03-19 20:28:24 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Networking!
|
|
|
|
networking = {
|
2021-03-28 02:04:41 +00:00
|
|
|
hostName = "bvm-nixosmgmt";
|
2021-03-19 20:28:24 +00:00
|
|
|
hostId = "49b0fbc7";
|
|
|
|
|
|
|
|
interfaces.enp1s0 = {
|
|
|
|
ipv4.addresses = [{ address = "10.100.0.200"; prefixLength = 23; }];
|
|
|
|
};
|
|
|
|
};
|
2021-03-28 13:10:27 +00:00
|
|
|
my.ip.tailscale = "100.65.226.19";
|
2021-03-19 20:28:24 +00:00
|
|
|
|
2021-04-10 17:20:35 +00:00
|
|
|
services.rundeck.enable = true;
|
|
|
|
|
2021-04-10 19:59:56 +00:00
|
|
|
environment.etc."rundeck.nodes.yaml" = let
|
|
|
|
content = builtins.mapAttrs (name: value: {
|
|
|
|
nodename = name;
|
|
|
|
hostname = value.config.networking.fqdn;
|
|
|
|
tags = lib.concatStringsSep "," value.config.my.rundeck.tags;
|
|
|
|
username = "deployer";
|
|
|
|
osFamily = "unix";
|
|
|
|
osName = "Linux";
|
|
|
|
}) (lib.filterAttrs
|
|
|
|
(name: value: value.config.my.rundeck.expectedOnline)
|
|
|
|
depot.ops.nixos.systemConfigs
|
|
|
|
);
|
|
|
|
in {
|
|
|
|
text = builtins.toJSON content;
|
|
|
|
};
|
|
|
|
|
2021-03-19 20:28:24 +00:00
|
|
|
system.stateVersion = "21.05";
|
|
|
|
}
|