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
All checks were successful
Build Nix modules (dry-run) / build-modules (push) Successful in 3m33s
This commit is contained in:
parent
9b38a54d16
commit
27f35b0fe5
1 changed files with 2 additions and 2 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
choose = paths: builtins.head (builtins.filter (p: builtins.pathExists p) paths);
|
choose = paths: lib.findFirst builtins.pathExists null paths;
|
||||||
in {
|
in {
|
||||||
options.local = {
|
options.local = {
|
||||||
hostname = lib.mkOption {
|
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/hostname_username.nix ../local/hostname_username.nix ])
|
||||||
(choose [ ./modules/local/networking_local.nix ../local/networking_local.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 ])
|
(choose [ ./modules/bootloader/seabios-assigned-iso-at-birth.nix ../bootloader/seabios-assigned-iso-at-birth.nix ])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue