mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-31 01:00:54 +02:00
chore: filter configurations through colmena tags
This commit is contained in:
parent
216f797cdb
commit
0cd5248dc4
6 changed files with 17 additions and 18 deletions
default.nix
machines
25
default.nix
25
default.nix
|
@ -46,23 +46,16 @@ rec {
|
||||||
})
|
})
|
||||||
) (lib.importConfig ./machines);
|
) (lib.importConfig ./machines);
|
||||||
|
|
||||||
colmena =
|
colmena = {
|
||||||
let
|
meta = {
|
||||||
deployableConfigurations = lib.filterAttrs (
|
nodeNixpkgs = builtins.mapAttrs (
|
||||||
_: v: builtins.hasAttr "ipv4" lib.luj.machines.${v.config.networking.hostName}
|
n: _: import lib.luj.machines.${n}.nixpkgs_version
|
||||||
) nixosConfigurations;
|
) nixosConfigurations;
|
||||||
in
|
nodeSpecialArgs = builtins.mapAttrs (
|
||||||
{
|
n: v: v._module.specialArgs // { lib = mkLibForMachine n; }
|
||||||
meta = {
|
) nixosConfigurations;
|
||||||
nodeNixpkgs = builtins.mapAttrs (
|
};
|
||||||
n: _: import lib.luj.machines.${n}.nixpkgs_version
|
} // builtins.mapAttrs (_: v: { imports = v._module.args.modules; }) nixosConfigurations;
|
||||||
) deployableConfigurations;
|
|
||||||
nodeSpecialArgs = builtins.mapAttrs (
|
|
||||||
n: v: v._module.specialArgs // { lib = mkLibForMachine n; }
|
|
||||||
) deployableConfigurations;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
// builtins.mapAttrs (_: v: { imports = v._module.args.modules; }) deployableConfigurations;
|
|
||||||
|
|
||||||
packages = builtins.listToAttrs (
|
packages = builtins.listToAttrs (
|
||||||
builtins.map (plat: {
|
builtins.map (plat: {
|
||||||
|
|
|
@ -8,8 +8,7 @@
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
deployment.targetHost = lib.mkForce "192.168.0.57";
|
deployment.tags = [ "server" ];
|
||||||
deployment.targetPort = lib.mkForce 45;
|
|
||||||
|
|
||||||
luj.nginx.enable = true;
|
luj.nginx.enable = true;
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
boot.loader.grub.device = "/dev/sda";
|
boot.loader.grub.device = "/dev/sda";
|
||||||
boot.loader.grub.useOSProber = true;
|
boot.loader.grub.useOSProber = true;
|
||||||
|
|
||||||
|
deployment.tags = [ "server" ];
|
||||||
|
|
||||||
systemd.network.enable = true;
|
systemd.network.enable = true;
|
||||||
systemd.network.networks."10-wan" = {
|
systemd.network.networks."10-wan" = {
|
||||||
matchConfig.Name = "ens18";
|
matchConfig.Name = "ens18";
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
deployment.tags = [ "server" ];
|
||||||
|
|
||||||
disko = import ./disko.nix;
|
disko = import ./disko.nix;
|
||||||
|
|
||||||
systemd.network.enable = true;
|
systemd.network.enable = true;
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
deployment.buildOnTarget = true;
|
deployment.buildOnTarget = true;
|
||||||
|
deployment.tags = [ "server" ];
|
||||||
|
|
||||||
luj.nginx.enable = true;
|
luj.nginx.enable = true;
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
mailserver.enable = true;
|
mailserver.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
deployment.tags = [ "server" ];
|
||||||
|
|
||||||
services.fail2ban.enable = true;
|
services.fail2ban.enable = true;
|
||||||
|
|
||||||
networking.hostId = "fbb334ae";
|
networking.hostId = "fbb334ae";
|
||||||
|
|
Loading…
Add table
Reference in a new issue