mirror of
https://github.com/javalsai/lidm.git
synced 2025-08-31 02:18:00 +02:00
24 lines
437 B
Nix
24 lines
437 B
Nix
{
|
|
cfg,
|
|
src,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
maker = import ./make-cfg.nix {
|
|
inherit lib;
|
|
keys-h-file = builtins.readFile "${src}/include/keys.h";
|
|
};
|
|
in
|
|
{
|
|
inherit maker;
|
|
file = builtins.toFile "lidm.conf" (
|
|
if builtins.isString cfg then
|
|
builtins.readFile "${src}/themes/${cfg}.ini"
|
|
else if builtins.isAttrs cfg then
|
|
maker.make cfg
|
|
else
|
|
builtins.throw "invalid cfg type, expected str or attrs"
|
|
);
|
|
}
|