Files
clan-core/nixosModules/flake-module.nix
Jörg Thalheim cdf9fa1753 move vm configuration into a stand-alone module and include it in our test vms
This hasn't reduced the extra deps we have to pass to our nixos build
unfortunally, but maybe at least it can safe us a few in the future.
2025-08-19 15:45:57 +00:00

41 lines
1.0 KiB
Nix

{ inputs, self, ... }:
let
clanCore =
{
_class,
pkgs,
lib,
...
}:
{
imports = [
./clanCore
inputs.sops-nix."${_class}Modules".sops
]
++ lib.optionals (_class == "nixos") [
inputs.nixos-facter-modules.nixosModules.facter
inputs.disko.nixosModules.default
inputs.data-mesher.nixosModules.data-mesher
];
config = {
clan.core.clanPkgs = lib.mkDefault self.packages.${pkgs.hostPlatform.system};
};
};
in
{
flake.nixosModules.hidden-ssh-announce = ./hidden-ssh-announce.nix;
flake.nixosModules.bcachefs = ./bcachefs.nix;
flake.nixosModules.user-firewall = ./user-firewall;
flake.nixosModules.installer.imports = [
./installer
self.nixosModules.hidden-ssh-announce
self.nixosModules.bcachefs
];
flake.nixosModules.clanCore = clanCore;
flake.darwinModules.clanCore = clanCore;
# Standalone VM base module that can be imported for VM testing
flake.nixosModules.clan-vm-base = ./clanCore/vm-base.nix;
}