0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-12 05:16:25 +03:00

nixos/gancio: make cli easier to use

This commit is contained in:
Sandro Jäckel 2025-03-25 20:04:03 +01:00
parent c7cc37d2f3
commit c5eb4441b9
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5

View file

@ -171,7 +171,16 @@ in
};
config = mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
environment.systemPackages = [
(pkgs.runCommand "gancio" { } ''
mkdir -p $out/bin
echo "#!${pkgs.runtimeShell}
cd /var/lib/gancio/
exec ${lib.getExe cfg.package} ''${1:---help}
" > $out/bin/gancio
chmod +x $out/bin/gancio
'')
];
users.users.gancio = lib.mkIf (cfg.user == "gancio") {
isSystemUser = true;