]> git.scottworley.com Git - pinch/blobdiff - pinch.py
Specify profile path with --profile
[pinch] / pinch.py
index 8c9e976583ffd4c2e5d049245ee4dc90db1e3742..a7f3449a6dfaabf175343eb97879cbdcf9552095 100644 (file)
--- a/pinch.py
+++ b/pinch.py
@@ -727,8 +727,7 @@ def updateCommand(args: argparse.Namespace) -> None:
     command = [
         'nix-env',
         '--profile',
-        '/nix/var/nix/profiles/per-user/%s/channels' %
-        getpass.getuser(),
+        args.profile,
         '--show-trace',
         '--file',
         '<nix/unpack-channel.nix>',
@@ -751,6 +750,8 @@ def main() -> None:
     parser_pin.set_defaults(func=pinCommand)
     parser_update = subparsers.add_parser('update')
     parser_update.add_argument('--dry-run', action='store_true')
+    parser_update.add_argument('--profile', default=(
+        '/nix/var/nix/profiles/per-user/%s/channels' % getpass.getuser()))
     parser_update.add_argument('channels_file', type=str, nargs='+')
     parser_update.set_defaults(func=updateCommand)
     args = parser.parse_args()