1
0
nixfiles/modules/nixfiles/default.nix

36 lines
731 B
Nix
Raw Permalink Normal View History

2023-02-26 18:45:26 +01:00
{ config, pkgs, lib, ...}:
with lib;
{
2023-02-26 18:45:26 +01:00
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; [
2023-02-26 18:45:26 +01:00
nixfiles-generate-config
];
};
}