Added blank module catching to handle if module does not exist yet.
All checks were successful
Build Nix modules (dry-run) / build-modules (push) Successful in 3m33s

This commit is contained in:
Root User 2026-02-12 19:29:07 +01:00
parent 9b38a54d16
commit 27f35b0fe5
Signed by: root
GPG key ID: 087F0A95E5766D72

View file

@ -4,7 +4,7 @@
lib,
...
}: let
choose = paths: builtins.head (builtins.filter (p: builtins.pathExists p) paths);
choose = paths: lib.findFirst builtins.pathExists null paths;
in {
options.local = {
hostname = lib.mkOption {
@ -29,7 +29,7 @@ in {
};
};
imports = [
imports = lib.filter (x: x != null) [
(choose [ ./modules/local/hostname_username.nix ../local/hostname_username.nix ])
(choose [ ./modules/local/networking_local.nix ../local/networking_local.nix ])
(choose [ ./modules/bootloader/seabios-assigned-iso-at-birth.nix ../bootloader/seabios-assigned-iso-at-birth.nix ])