feat(nix): reorganize nix flake for modularity and flexibility

This commit is contained in:
2025-07-06 01:24:43 +02:00
parent 22c75a37e1
commit b580b6917b
2 changed files with 30 additions and 23 deletions

26
assets/pkg/nix/lidm.nix Normal file
View File

@@ -0,0 +1,26 @@
{ config, pkgs, ...}: pkgs.stdenv.mkDerivation rec {
pname = "lidm";
version = config.version;
src = config.src;
nativeBuildInputs = with pkgs; [
gcc
gnumake
linux-pam
];
makeFlags = [
"DESTDIR=$(out)"
"PREFIX="
];
installPhase = ''
make install DESTDIR=$out PREFIX=
mkdir -p $out/etc/systemd/system/
make install-service-systemd DESTDIR=$out PREFIX=
'';
fixupPhase = ''
rm -rf $out/etc
'';
}