mirror of
https://github.com/javalsai/lidm.git
synced 2025-08-31 02:18:00 +02:00
feat: nixos module is configurable now
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
{ config, pkgs, lib, ...}: pkgs.stdenv.mkDerivation rec {
|
||||
{ config, pkgs, lib, ...}:
|
||||
let
|
||||
cfg-file = if config.cfg != null then
|
||||
import ./get-cfg-file.nix {
|
||||
inherit lib;
|
||||
inherit (config) cfg src;
|
||||
}
|
||||
else null;
|
||||
in
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "lidm";
|
||||
version = config.version;
|
||||
src = config.src;
|
||||
@@ -16,7 +25,9 @@
|
||||
++ lib.optional (config.xsessions != null)
|
||||
"CPPFLAGS+=-DSESSIONS_XSESSIONS=\\\"${config.xsessions}\\\""
|
||||
++ lib.optional (config.wayland-sessions != null)
|
||||
"CPPFLAGS+=-DSESSIONS_WAYLAND=\\\"${config.wayland-sessions}\\\"";
|
||||
"CPPFLAGS+=-DSESSIONS_WAYLAND=\\\"${config.wayland-sessions}\\\""
|
||||
++ lib.optional (cfg-file != null)
|
||||
"CPPFLAGS+=-DLIDM_CONF_PATH=\\\"${cfg-file}\\\"";
|
||||
|
||||
fixupPhase = ''
|
||||
rm -rf $out/etc
|
||||
|
Reference in New Issue
Block a user