mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-25 21:30:52 +01: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
25
default.nix
25
default.nix
|
@ -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: {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
deployment.buildOnTarget = true;
|
||||
deployment.tags = [ "server" ];
|
||||
|
||||
luj.nginx.enable = true;
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
mailserver.enable = true;
|
||||
};
|
||||
|
||||
deployment.tags = [ "server" ];
|
||||
|
||||
services.fail2ban.enable = true;
|
||||
|
||||
networking.hostId = "fbb334ae";
|
||||
|
|
Loading…
Add table
Reference in a new issue