Create a dummy file system.
All checks were successful
Build Nix modules (dry-run) / build-modules (push) Successful in 3m31s
All checks were successful
Build Nix modules (dry-run) / build-modules (push) Successful in 3m31s
This commit is contained in:
parent
a75307bd6a
commit
9b38a54d16
1 changed files with 11 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue