1
0

flake/modules.nix seperate out modules from inputs

This commit is contained in:
clerie 2024-05-13 16:44:21 +02:00
parent e777528435
commit 0453d34606
Signed by: clerie
GPG Key ID: BD9F56480870BAD2
3 changed files with 21 additions and 5 deletions

View File

@ -93,6 +93,7 @@
nixosConfigurations = helper.mapToNixosConfigurations self.clerie.hosts; nixosConfigurations = helper.mapToNixosConfigurations self.clerie.hosts;
nixosModules = { nixosModules = {
nixfilesInputs = import ./flake/modules.nix inputs;
clerie = import ./modules; clerie = import ./modules;
default = self.nixosModules.clerie; default = self.nixosModules.clerie;
}; };

19
flake/modules.nix Normal file
View File

@ -0,0 +1,19 @@
{ self
, fernglas
, fieldpoc
, nixos-exporter
, solid-xmpp-alarm
, sops-nix
, ...
}@inputs:
{ ... }:
{
imports = [
fernglas.nixosModules.default
fieldpoc.nixosModules.default
nixos-exporter.nixosModules.default
solid-xmpp-alarm.nixosModules.solid-xmpp-alarm
sops-nix.nixosModules.sops
];
}

View File

@ -11,6 +11,7 @@ rec {
in localNixpkgs.lib.nixosSystem { in localNixpkgs.lib.nixosSystem {
system = system; system = system;
modules = modules ++ [ modules = modules ++ [
self.nixosModules.nixfilesInputs
self.nixosModules.clerie self.nixosModules.clerie
({ ... }: { ({ ... }: {
/* /*
@ -32,11 +33,6 @@ rec {
]; ];
clerie.monitoring = nixpkgs.lib.attrsets.optionalAttrs (group != null) { serviceLevel = group; }; clerie.monitoring = nixpkgs.lib.attrsets.optionalAttrs (group != null) { serviceLevel = group; };
}) })
fernglas.nixosModules.default
fieldpoc.nixosModules.default
nixos-exporter.nixosModules.default
solid-xmpp-alarm.nixosModules.solid-xmpp-alarm
sops-nix.nixosModules.sops
(../hosts + "/${name}/configuration.nix") (../hosts + "/${name}/configuration.nix")
# Automatically load secrets from sops file for host # Automatically load secrets from sops file for host
({ config, lib, ... }: { ({ config, lib, ... }: {