isle/dist/linux/default.nix

19 lines
533 B
Nix
Raw Normal View History

2024-12-20 11:49:01 +00:00
{
buildRoot = { pkgs, appDir}: pkgs.runCommand "isle-linux-root" {} ''
mkdir -p "$out"
cp -r ${appDir}/usr "$out"/
chmod +w -R "$out"/usr
mkdir -p "$out"/etc/isle
cp "${../../go/daemon/daecommon/daemon.yml}" "$out"/etc/isle/daemon.yml
mkdir -p "$out"/usr/lib/sysusers.d/
cat >"$out"/usr/lib/sysusers.d/isle.conf <<EOF
u isle - "isle Daemon"
EOF
mkdir -p "$out"/usr/lib/systemd/system
cp "${./isle.service}" "$out"/usr/lib/systemd/system/isle.service
'';
}