Commit graph

8 commits

Author SHA1 Message Date
June 744bbdb245
docs: add basic documentation to the infra-rebuild root command
All checks were successful
/ ruff (push) Successful in 25s
/ black (push) Successful in 25s
This way, by only looking at the help page, users should get a good
enough idea on how to use infra-rebuild to start using it.
2024-06-10 02:35:59 +02:00
June a7772aa154
feature!: introduce --flake option for setting the flake to use
All checks were successful
/ ruff (push) Successful in 25s
/ black (push) Successful in 25s
Having this option available allows for using a flake which isn't in (or
upwards of) the directory the command gets executed in and allows for
using remote flakes.

Also archive the flake to use first and then operate on the archive.
This allows for easily getting the deployment_configuration.json from
the archive and also ensures that once the archiving suceeds, there
shouldn't be issues with the flakes source anymore.
Since now the deployment_configuration.json will always be taken from
the root of the flakes archive and therefore from the root of the flakes
repo, this is a breaking change, since previously it was taken from the
current working directory.
The idea of archiving the flake first and operating on the archive comes
from bij:
221052d846

Moreover introduce helper functions for facilitating recursive options
(i.e. options one can set on root and sub-commands).
2024-06-10 02:08:23 +02:00
June d164f502a1
docs: add help text doc. that reboot is a conv. alias for boot --reboot
All checks were successful
/ ruff (push) Successful in 26s
/ black (push) Successful in 26s
2024-06-09 00:33:24 +02:00
June fd9ad17d79
feature: add --reboot flag for remote operations (except for "reboot")
All checks were successful
/ ruff (push) Successful in 25s
/ black (push) Successful in 26s
Also make the "reboot" operation basically an alias for "boot --reboot"
then and simplify the code of the operations.run function, since it
doesn't need to convert between operation and actual_operation anymore.
2024-06-09 00:26:04 +02:00
June 3cdd4ba8b5
update!: switch from one comma-sep. argument to variadic args. for hosts
Since the hosts are what nixos-rebuild acts on it makes to have them
represented by unlimited variadic arguments similar to how "git add",
"cat", "nix build", etc. work.
2024-06-06 21:08:38 +02:00
June 89cb3586c2
build: set version statically in pyproject.toml 2024-06-06 20:23:48 +02:00
June 05c45fe5e3
Port infra-rebuild to Python
Do this for a nicer developer experience in a safer language, which has
nice libraries available to e.g. build command line interfaces (e.g.
click).

Set minimum Python version to 3.10 to support match statements.
2024-06-06 00:05:55 +02:00
June 500438636a
Create a skeleton python project and modify it to fit this project
Create a skeleton python project using "hatch new -i --cli
infra-rebuild" with Hatch version 1.7.0 and modify it to fit this
project. This is the first step of porting infra-rebuild to Python.

Also provide a first .gitignore ignoring relevant build directories.
2024-06-05 15:24:47 +02:00