use also buildClan
This commit is contained in:
parent
617c897810
commit
dfd39c8ce9
|
@ -6,13 +6,7 @@
|
||||||
# FIXME: switch to VPN later
|
# FIXME: switch to VPN later
|
||||||
{ networking.firewall.allowedTCPPorts = [ 9273 ]; }
|
{ networking.firewall.allowedTCPPorts = [ 9273 ]; }
|
||||||
|
|
||||||
inputs.clan-core.nixosModules.clanCore
|
|
||||||
./admins.nix
|
./admins.nix
|
||||||
{
|
|
||||||
# TODO: use buildClan
|
|
||||||
clanCore.clanDir = "${./..}";
|
|
||||||
clanCore.machineName = "web01";
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
hetzner-ax102.imports = [
|
hetzner-ax102.imports = [
|
||||||
|
|
|
@ -1,24 +1,17 @@
|
||||||
{ lib, self, ... }:
|
{ self, inputs, ... }:
|
||||||
let
|
|
||||||
entries = builtins.attrNames (builtins.readDir ./.);
|
|
||||||
configs = builtins.filter (dir: builtins.pathExists (./. + "/${dir}/configuration.nix")) entries;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
flake.nixosConfigurations = lib.listToAttrs
|
flake.nixosConfigurations = inputs.clan-core.lib.buildClan {
|
||||||
(builtins.map
|
directory = self;
|
||||||
(name:
|
# Make flake available in modules
|
||||||
lib.nameValuePair
|
specialArgs = {
|
||||||
(builtins.replaceStrings [ "." ] [ "-" ] name)
|
self = {
|
||||||
(lib.nixosSystem {
|
inherit (self) inputs nixosModules packages;
|
||||||
system = "x86_64-linux";
|
};
|
||||||
# Make flake available in modules
|
};
|
||||||
specialArgs = {
|
machines = {
|
||||||
self = {
|
web01 = { modulesPath, ... }: {
|
||||||
inherit (self) inputs nixosModules packages;
|
imports = [ (./web01/configuration.nix) ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
modules = [ (./. + "/${name}/configuration.nix") ];
|
|
||||||
}))
|
|
||||||
configs);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user