feat: nixos module is configurable now

This commit is contained in:
2025-07-06 22:53:09 +02:00
parent 2574ef4ac0
commit 16901b14c8
5 changed files with 106 additions and 2 deletions

View File

@@ -0,0 +1,13 @@
{ cfg, src, lib, ... }:
let
maker = import ./make-cfg.nix {
inherit lib;
keys-h-file = builtins.readFile "${src}/include/keys.h";
};
in 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"
)