Commit Graph

63 Commits

Author SHA1 Message Date
Thiago Kenji Okada
6ea9eae476 nixos-rebuild-ng: avoid usage of implementation details in LogFormatter 2024-11-30 20:19:32 +00:00
Thiago Kenji Okada
4bc3ac552d nixos-rebuild-ng: merge actions 2024-11-30 18:28:36 +00:00
Thiago Kenji Okada
4431a47fcb nixos-rebuild-ng: add --build-host/--target-host to TEST/BUILD/DRY_BUILD/DRY_ACTIVATE 2024-11-30 18:15:45 +00:00
r-vdp
a61aede368 nixos-rebuild-ng: make sure to copy the new closure when doing test or build 2024-11-30 18:02:39 +00:00
Thiago Kenji Okada
cab7882bf5 nixos-rebuild-ng: move check for missing action argument earlier 2024-11-30 17:54:32 +00:00
Thiago Kenji Okada
b118371ebb nixos-rebuild-ng: add SSH_DEFAULT_OPTS to copy-closure 2024-11-30 17:54:32 +00:00
Thiago Kenji Okada
c50144ab79 nixos-rebuild-ng: move reexec earlier 2024-11-30 17:54:32 +00:00
Thiago Kenji Okada
f72572c147 nixos-rebuild-ng: ignore non-directories in upgrade_channels 2024-11-30 17:54:32 +00:00
Thiago Kenji Okada
cfe42fba1c nixos-rebuild-ng: do not fail if re-exec fails 2024-11-30 17:54:32 +00:00
Thiago Kenji Okada
bebec2668b nixos-rebuild-ng: add missing flags from nixos-rebuild-ng 2024-11-30 17:54:32 +00:00
Thiago Kenji Okada
6c3ba91ce4 nixos-rebuild-ng: rename template file to not trigger CI 2024-11-30 17:54:31 +00:00
Thiago Kenji Okada
fed6778da3 nixos-rebuild-ng: move temporary directory to process 2024-11-30 17:54:31 +00:00
Thiago Kenji Okada
776c21be0f nixos-rebuild-ng: fix cleanup_ssh 2024-11-30 17:54:31 +00:00
Thiago Kenji Okada
3fd384af80 nixos-rebuild-ng: implement _NIXOS_REBUILD_REEXEC 2024-11-30 17:54:31 +00:00
Thiago Kenji Okada
3cadcd1653 nixos-rebuild-ng: make build functions more generic 2024-11-30 17:54:31 +00:00
Thiago Kenji Okada
359d341535 nixos-rebuild-ng: add {BuildAttr,Flake}.to_attr() 2024-11-30 17:54:31 +00:00
Thiago Kenji Okada
c859df048f nixos-rebuild-ng: refactor classic Nix to simplify logic 2024-11-30 17:54:31 +00:00
Thiago Kenji Okada
29e9b42022 nixos-rebuild-ng: fix --build-host and --target-host case 2024-11-30 17:54:31 +00:00
Thiago Kenji Okada
2ac1f78a11 nixos-rebuild-ng: validate NIX_SSHOPTS only once 2024-11-30 17:54:30 +00:00
Thiago Kenji Okada
7d58c66881 nixos-rebuild-ng: fix --build-host 2024-11-30 17:54:30 +00:00
Thiago Kenji Okada
34cda44208 nixos-rebuild-ng: use nix build for remote builds in Flakes, fix remote args 2024-11-30 17:54:30 +00:00
Thiago Kenji Okada
8a4105cfd7 nixos-rebuild-ng: update README.md 2024-11-30 17:54:30 +00:00
Thiago Kenji Okada
f7266986d3 nixos-rebuild-ng: implement --build-host 2024-11-30 17:54:30 +00:00
Thiago Kenji Okada
02b943d57f nixos-rebuild-ng: use find_file in edit 2024-11-30 17:54:30 +00:00
Thiago Kenji Okada
73567536e1 nixos-rebuild-ng: add from_host in nix.copy_closure 2024-11-30 17:54:30 +00:00
Thiago Kenji Okada
3a0c0975a8 nixos-rebuild-ng: remove unnecessary "from __future__ import annotations" 2024-11-30 17:54:29 +00:00
Thiago Kenji Okada
7a01349f79 nixos-rebuild-ng: add TRY201 check for ruff 2024-11-30 17:54:29 +00:00
Thiago Kenji Okada
1e34a97f9f nixos-rebuild-ng: add message to help if the user forgot --ask-sudo-password 2024-11-30 17:54:29 +00:00
Thiago Kenji Okada
2db09d7f77 nixos-rebuild-ng: configure logging 2024-11-30 17:54:29 +00:00
Thiago Kenji Okada
5cc71a346a nixos-rebuild-ng: Profile.from_name -> Profile.from_arg 2024-11-30 17:54:29 +00:00
Thiago Kenji Okada
0774b36546 nixos-rebuild-ng: move default path logic to BuildAttr 2024-11-30 17:54:29 +00:00
Thiago Kenji Okada
88b4eb3aeb nixos-rebuild-ng: add repl 2024-11-30 17:54:29 +00:00
Thiago Kenji Okada
d325edd627 nixos-rebuild-ng: introduce models.BuildingAttr 2024-11-30 17:54:27 +00:00
r-vdp
ad356675a8
nixos-rebuild-ng: don't repeat the keep_going argument
It is already provided by common_args, and repeating it leads to a
runtime error.
2024-11-30 12:13:03 +09:00
Thiago Kenji Okada
5cbc6f5623 nixos-rebuild-ng: use argparse groups to group nix flags 2024-11-27 14:21:15 +00:00
Thiago Kenji Okada
287518360a nixos-rebuild-ng: validate NIX_SSHOPTS 2024-11-27 11:01:02 +00:00
Thiago Kenji Okada
3ef018f5e3 nixos-rebuild-ng: set process.run_wrapper check=True by default 2024-11-26 22:08:27 +00:00
Thiago Kenji Okada
3a080abf13 nixos-rebuild-ng: import nix module instead of each individual function 2024-11-26 20:12:21 +00:00
Thiago Kenji Okada
088785adf8 nixos-rebuild-ng: split parser_args in get_parser 2024-11-26 17:14:24 +00:00
Thiago Kenji Okada
0479ef4106 nixos-rebuild-ng: remove explicit check for git and instead check exception 2024-11-26 16:56:49 +00:00
Thiago Kenji Okada
2e4d755351 nixos-rebuild-ng: do not use TTY for --target-host
Instead this commit introduces the `--ask-sudo-password` that stores the
password in memory and injects it via `stdin` if the user wants.
2024-11-26 16:21:13 +00:00
Thiago Kenji Okada
10f2b080c3 nixos-rebuild-ng: move test to the correct file 2024-11-26 16:21:13 +00:00
Thiago Kenji Okada
4adad7f664 nixos-rebuild-ng: implement --target-host for --rollback 2024-11-26 16:21:13 +00:00
Thiago Kenji Okada
e37e7e348d nixos-rebuild-ng: cleanup SSH ControlMaster at exit 2024-11-26 16:21:13 +00:00
Thiago Kenji Okada
f443299c58 nixos-rebuild-ng: remove support for env in process.run_wrapper 2024-11-26 16:21:12 +00:00
Thiago Kenji Okada
866e1786e3 nixos-rebuild-ng: move models.Ssh to process.Remote 2024-11-26 16:21:12 +00:00
Thiago Kenji Okada
37d6a2688f nixos-rebuild-ng: get remote hostname 2024-11-26 16:21:12 +00:00
Thiago Kenji Okada
56203bca4e nixos-rebuild-ng: add allow_tty parameter to process.run_wrapper 2024-11-26 16:21:12 +00:00
Thiago Kenji Okada
8bd70ef699 nixos-rebuild-ng: error when --rollback is called with incompatible action 2024-11-26 16:21:12 +00:00
Thiago Kenji Okada
a2cbe67701 nixos-rebuild-ng: implement --target-host 2024-11-26 16:21:12 +00:00