lib/nixosSystem.nix: Wrap nixpkgs.lib.nixosSystem and include nixfiles modules and overlays by default
This commit is contained in:
@@ -10,29 +10,13 @@ let
|
||||
group ? null,
|
||||
modules ? [],
|
||||
}: let
|
||||
localNixpkgs = import ./nixpkgs.nix inputs;
|
||||
in nixpkgs.lib.nixosSystem {
|
||||
in self.lib.nixosSystem {
|
||||
system = system;
|
||||
pkgs = localNixpkgs.${system};
|
||||
modules = modules ++ [
|
||||
self.nixosModules.nixfilesInputs
|
||||
self.nixosModules.clerie
|
||||
self.nixosModules.profiles
|
||||
|
||||
({ config, lib, ... }: {
|
||||
# Set hostname
|
||||
networking.hostName = lib.mkDefault name;
|
||||
|
||||
/*
|
||||
Make the contents of the flake availiable to modules.
|
||||
Useful for having the monitoring server scraping the
|
||||
target config from all other servers automatically.
|
||||
*/
|
||||
_module.args = {
|
||||
inputs = inputs;
|
||||
_nixfiles = self;
|
||||
};
|
||||
|
||||
# Expose host group to monitoring
|
||||
clerie.monitoring = nixpkgs.lib.attrsets.optionalAttrs (group != null) { serviceLevel = group; };
|
||||
|
||||
|
Reference in New Issue
Block a user