Unverified Commit c5eb4441 authored by Sandro Jäckel's avatar Sandro Jäckel
Browse files

nixos/gancio: make cli easier to use

parent c7cc37d2
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -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;