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:
parent
c7cc37d2f3
commit
c5eb4441b9
1 changed files with 10 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue