{ config, pkgs, lib, ...}: with lib; { options.clerie.nixfiles.enable = mkEnableOption "clerie nixfiles tools"; config = mkIf config.clerie.nixfiles.enable { system.nixos-generate-config.configuration = '' { config, pkgs, lib, ... }: { imports = [ ./hardware-configuration.nix ]; $bootLoaderConfig networking.hostName = "%HOSTNAME%"; clerie.monitoring = { # enable = true; id = "%MONITORING_ID%"; pubkey = "%MONITORING_PUBKEY%"; }; system.stateVersion = "${config.system.nixos.release}"; } ''; environment.systemPackages = with pkgs; [ nixfiles-generate-config ]; }; }