Create a dummy file system.
All checks were successful
Build Nix modules (dry-run) / build-modules (push) Successful in 3m31s

This commit is contained in:
Root User 2026-02-12 19:22:17 +01:00
parent a75307bd6a
commit 9b38a54d16
Signed by: root
GPG key ID: 087F0A95E5766D72

View file

@ -5,6 +5,15 @@
...
}: let
choose = paths: builtins.head (builtins.filter (p: builtins.pathExists p) paths);
# Dummy filesystem config for dry-run evaluation
dummyFileSystems = {
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
};
in {
options.local = {
hostname = lib.mkOption {
@ -35,7 +44,8 @@ in {
(choose [ ./modules/lix-default.nix ../lix-default.nix ])
(choose [ ./modules/secrets-config/sops-build-machine.nix ../secrets-config/sops-build-machine.nix ])
## TODO: Make this more elegant and less risky for unexpected errors happening.
] ++ lib.optional (builtins.pathExists ./hardware-configuration.nix) ./hardware-configuration.nix;
] ++ lib.optional (builtins.pathExists ./hardware-configuration.nix) ./hardware-configuration.nix
++ lib.optional (!builtins.pathExists ./hardware-configuration.nix) dummyFileSystems;
config = {
# Local metadata