fmt(nix): add nix fmt, fmt and update flake.lock

This commit is contained in:
2025-07-07 02:38:04 +02:00
parent 3625aa9426
commit 4611ad87a8
6 changed files with 180 additions and 147 deletions

View File

@@ -1,35 +1,44 @@
{ config, pkgs, lib, ...}:
{
config,
pkgs,
lib,
...
}:
let
cfg-file = if config.cfg != null then
import ./get-cfg-file.nix {
inherit lib;
inherit (config) cfg src;
}
else null;
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;
pname = "lidm";
version = config.version;
src = config.src;
nativeBuildInputs = with pkgs; [
gcc
gnumake
linux-pam
];
nativeBuildInputs = with pkgs; [
gcc
gnumake
linux-pam
];
makeFlags = [
"DESTDIR=$(out)"
"PREFIX="
makeFlags =
[
"DESTDIR=$(out)"
"PREFIX="
]
++ lib.optional (config.xsessions != null)
"CPPFLAGS+=-DSESSIONS_XSESSIONS=\\\"${config.xsessions}\\\""
++ lib.optional (config.wayland-sessions != null)
"CPPFLAGS+=-DSESSIONS_WAYLAND=\\\"${config.wayland-sessions}\\\""
++ lib.optional (cfg-file != null)
"CPPFLAGS+=-DLIDM_CONF_PATH=\\\"${cfg-file}\\\"";
++ lib.optional (
config.xsessions != null
) "CPPFLAGS+=-DSESSIONS_XSESSIONS=\\\"${config.xsessions}\\\""
++ lib.optional (
config.wayland-sessions != null
) "CPPFLAGS+=-DSESSIONS_WAYLAND=\\\"${config.wayland-sessions}\\\""
++ lib.optional (cfg-file != null) "CPPFLAGS+=-DLIDM_CONF_PATH=\\\"${cfg-file}\\\"";
fixupPhase = ''
rm -rf $out/etc
'';
fixupPhase = ''
rm -rf $out/etc
'';
}