From 4d05c0c64528c5f1938dece7f59e2a9bb6b034c6 Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Tue, 19 Nov 2024 22:48:31 -0500 Subject: [PATCH] refactor: remove `default.nix` file in module dir --- config.nix | 6 ++++-- flake.nix | 1 + modules/default.nix | 8 -------- 3 files changed, 5 insertions(+), 10 deletions(-) delete mode 100644 modules/default.nix diff --git a/config.nix b/config.nix index 8b03546..dc06a9d 100644 --- a/config.nix +++ b/config.nix @@ -1,6 +1,8 @@ { config, lib, pkgs, rpi5-kernel, ... }: -{ - imports = [ ./hardware-configuration.nix ./modules ]; +let modules = builtins.map (mod: modules/${mod}.nix); +in { + imports = + modules [ "acme" "fail2ban" "forgejo" ]; boot.kernelPackages = rpi5-kernel.legacyPackages.aarch64-linux.linuxPackages_rpi5; boot.loader.systemd-boot.enable = true; diff --git a/flake.nix b/flake.nix index 15a1dba..768cdf2 100644 --- a/flake.nix +++ b/flake.nix @@ -20,6 +20,7 @@ outputs = inputs@{ self, nixpkgs, agenix, ... }: modules = [ { _module.args = inputs; } agenix.nixosModules.default + ./hardware-configuration.nix ./config.nix ]; }; diff --git a/modules/default.nix b/modules/default.nix deleted file mode 100644 index d5b43c3..0000000 --- a/modules/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ ... }: -{ - imports = [ - ./acme.nix - ./fail2ban.nix - ./forgejo.nix - ]; -}