mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-09-17 14:57:22 +03:00
d63c2a8d64
Turns out nvim has a tab limit, so I didn't get all of them last time. - Remove the last usages of URL literals - All unused variables and arguments (the only exceptions are module args and lib) are removed - Clean up a couple more unused recs
42 lines
999 B
Nix
42 lines
999 B
Nix
{ pkgs ? (import ../../pkgs.nix {})
|
|
, device
|
|
}:
|
|
|
|
let
|
|
eval = import ../../lib/eval-with-configuration.nix ({
|
|
inherit device pkgs;
|
|
configuration = [
|
|
(
|
|
{ config, lib, ... }:
|
|
let
|
|
inherit (lib)
|
|
filter
|
|
concatStringsSep
|
|
showWarnings
|
|
;
|
|
# Handle assertions and warnings
|
|
failedAssertions = map (x: x.message) (filter (x: !x.assertion) config.assertions);
|
|
|
|
# This `eval` wraps assertion checks
|
|
_out = if failedAssertions != []
|
|
then throw "\nFailed assertions:\n${concatStringsSep "\n" (map (x: "- ${x}") failedAssertions)}"
|
|
else showWarnings config.warnings { inherit config; };
|
|
in
|
|
{
|
|
imports = [
|
|
./configuration.nix
|
|
];
|
|
options = {
|
|
_out = lib.mkOption {
|
|
};
|
|
};
|
|
config = {
|
|
inherit _out;
|
|
};
|
|
}
|
|
)
|
|
];
|
|
});
|
|
in
|
|
eval.config._out
|