nix/package: add systemd units

This commit is contained in:
2026-07-30 18:54:08 +09:00
parent d4e5d7fc0d
commit 73dbfc934f
2 changed files with 12 additions and 2 deletions
+1 -1
View File
@@ -91,7 +91,7 @@
root = ./.;
fileset = lib.fileset.unions [
(craneLib.fileset.commonCargoSources ./.)
# ./assets
./assets/systemd
];
};
+11 -1
View File
@@ -83,7 +83,17 @@ buildFunction ({
shell = [ "bash" "zsh" "fish" ];
command = [ "rwho" "ruptime" "finger" "wall" "write" ];
};
in lib.concatStringsSep "\n" installShellCompletions;
in ''
${lib.concatStringsSep "\n" installShellCompletions}
install -Dm444 assets/systemd/roowho2-audit.socket "$out/lib/systemd/system/roowho2-audit.socket"
install -Dm444 assets/systemd/roowho2-client.socket "$out/lib/systemd/system/roowho2-client.socket"
install -Dm444 assets/systemd/roowho2-rwhod.socket "$out/lib/systemd/system/roowho2-rwhod.socket"
install -Dm444 assets/systemd/roowho2.service "$out/lib/systemd/system/roowho2.service"
substituteInPlace "$out/lib/systemd/system/roowho2.service" \
--replace "/usr/bin/roowhod" "${placeholder "out"}/bin/${mainProgram}"
'';
meta = with lib; {
license = licenses.bsdOriginalUC;