chore: filter configurations through colmena tags

This commit is contained in:
Julien Malka 2024-05-26 20:24:00 +02:00
parent 216f797cdb
commit 0cd5248dc4
Signed by: Luj
GPG key ID: 6FC74C847011FD83
6 changed files with 17 additions and 18 deletions

View file

@ -46,23 +46,16 @@ rec {
})
) (lib.importConfig ./machines);
colmena =
let
deployableConfigurations = lib.filterAttrs (
_: v: builtins.hasAttr "ipv4" lib.luj.machines.${v.config.networking.hostName}
colmena = {
meta = {
nodeNixpkgs = builtins.mapAttrs (
n: _: import lib.luj.machines.${n}.nixpkgs_version
) nixosConfigurations;
in
{
meta = {
nodeNixpkgs = builtins.mapAttrs (
n: _: import lib.luj.machines.${n}.nixpkgs_version
) deployableConfigurations;
nodeSpecialArgs = builtins.mapAttrs (
n: v: v._module.specialArgs // { lib = mkLibForMachine n; }
) deployableConfigurations;
};
}
// builtins.mapAttrs (_: v: { imports = v._module.args.modules; }) deployableConfigurations;
nodeSpecialArgs = builtins.mapAttrs (
n: v: v._module.specialArgs // { lib = mkLibForMachine n; }
) nixosConfigurations;
};
} // builtins.mapAttrs (_: v: { imports = v._module.args.modules; }) nixosConfigurations;
packages = builtins.listToAttrs (
builtins.map (plat: {

View file

@ -8,8 +8,7 @@
# Bootloader.
boot.loader.systemd-boot.enable = true;
deployment.targetHost = lib.mkForce "192.168.0.57";
deployment.targetPort = lib.mkForce 45;
deployment.tags = [ "server" ];
luj.nginx.enable = true;

View file

@ -15,6 +15,8 @@
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
deployment.tags = [ "server" ];
systemd.network.enable = true;
systemd.network.networks."10-wan" = {
matchConfig.Name = "ens18";

View file

@ -11,6 +11,8 @@
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
deployment.tags = [ "server" ];
disko = import ./disko.nix;
systemd.network.enable = true;

View file

@ -10,6 +10,7 @@
boot.loader.efi.canTouchEfiVariables = true;
deployment.buildOnTarget = true;
deployment.tags = [ "server" ];
luj.nginx.enable = true;

View file

@ -17,6 +17,8 @@
mailserver.enable = true;
};
deployment.tags = [ "server" ];
services.fail2ban.enable = true;
networking.hostId = "fbb334ae";