Commit Graph

56 Commits

Author SHA1 Message Date
Jörg Thalheim
ea2d6aab65 ruff: apply automatic fixes 2025-08-25 11:34:41 +02:00
Jörg Thalheim
377056e80c clan flakes create: initialize keys automatically (#4435)
fixes https://git.clan.lol/clan/clan-core/issues/2665
fixes https://git.clan.lol/clan/clan-core/issues/4407

Co-authored-by: DavHau <d.hauer.it@gmail.com>
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4435
Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
Co-committed-by: Jörg Thalheim <joerg@thalheim.io>
2025-07-23 04:44:55 +00:00
a-kenji
fb52b955cc pkgs/cli: Add completions to clan flakes create --template [TEMPLATE]
Add completions to `clan flakes create --template [TEMPLATE]`
2025-07-22 13:01:45 +02:00
Johannes Kirschbauer
135df0dbe6 clan/create: rename path to name argument 2025-07-12 15:16:31 +02:00
Johannes Kirschbauer
f7b39fc941 cli/create: add interactive name method 2025-07-12 14:12:10 +02:00
Johannes Kirschbauer
f2db543651 Templates: migrate clan templates to flake identifiers 2025-07-06 15:37:10 +02:00
lassulus
c64895fdff clan-cli: split clan into cli and lib 2025-05-21 20:28:41 +02:00
lassulus
03990ef7f0 clan-cli: clan_cli.templates -> clan_lib.templates 2025-05-20 16:08:02 +02:00
lassulus
9a0c6f55bd clan-cli: clan_cli.cmd -> clan_lib.cmd 2025-05-19 19:07:24 +02:00
lassulus
cb74273da4 clan-cli: move clan_cli.nix to clan_lib.nix 2025-05-19 18:40:36 +02:00
lassulus
fa052f45bd clan_lib: move clan_lib.flake.flake to clan_lib.flake 2025-05-16 19:28:36 +02:00
Johannes Kirschbauer
fe0507b47c refactor: move clan_cli.error to clan_lib.error 2025-05-16 16:14:39 +02:00
lassulus
5423b9af41 clan_cli: move flake class to clan_lib 2025-05-16 13:38:47 +02:00
Johannes Kirschbauer
6de58478fa Refactor: replace direct references to inventory
Deprecated. Inventory should be accessed via InventoryStore {read(),write(),...}
2025-05-16 11:30:41 +02:00
Johannes Kirschbauer
bdb075be11 refactor(cli/inventory): remove unncessary init_inventory function 2025-05-14 12:15:36 +02:00
Johannes Kirschbauer
45b12cdce6 Refactor(clan_lib): move nix bound classes out of the cli folder 2025-05-13 18:39:36 +02:00
Qubasa
89decdaf7e clan-cli: Refactor the API to use the Flake object 2025-05-07 16:43:50 +00:00
Jörg Thalheim
1037bd115b Revert "Merge pull request 'clan-cli: Refactor the API to use the Flake object' (#3531) from Qubasa/clan-core:replace_machine_name_with_machine_obj into main"
This reverts commit c09618b323, reversing
changes made to 45b2539455.
2025-05-07 15:24:57 +02:00
Qubasa
a6a69bb09b clan-cli: Refactor the API to use the Flake object 2025-05-07 13:12:48 +02:00
Johannes Kirschbauer
f6628ec1a9 Refactor(clan_lib): move clan_cli.api into clan_lib.api 2025-04-26 19:51:35 +02:00
Jörg Thalheim
723d72255c Reapply "remove nix_shell_legacy"
This reverts commit c5001f19fc.
2025-04-21 13:23:50 +02:00
Johannes Kirschbauer
c5001f19fc Revert "remove nix_shell_legacy"
This reverts commit f3512b853a.
2025-04-18 14:49:54 +02:00
Jörg Thalheim
f3512b853a remove nix_shell_legacy 2025-04-16 21:03:58 +02:00
Jörg Thalheim
837789010e rename nix_shell_legacy to nix_shell and run_cmd to nix_shell
Than it's more obvious that we need to migrate.
2025-04-16 18:27:01 +00:00
Qubasa
63a0e5f35d clan-cli: Fix templates not downloading template, Make templates use Flake cache, Fix flake cache exception on conditional attribute, add more tests 2025-03-19 10:30:52 +00:00
Qubasa
2d0bcfe6f6 clan-cli: Fix clan create throwing a warning if --flake is not defined 2025-02-18 17:40:27 +07:00
Qubasa
52fd912b45 clan-cli: Fix clan flakes create inside an already existing git repo 2025-02-17 13:23:31 +07:00
Qubasa
a8fa8f505c clan-cli: Add update_clan boolean option to create_clan 2025-02-10 20:36:55 +07:00
lassulus
2a8f40e91a clan_cli machines: use Flake instead of FlakeId 2025-02-07 06:26:09 +01:00
Qubasa
bf26a2d306 clan-cli: Fix incorrect input handling in get_templates 2025-02-04 08:10:32 +00:00
Qubasa
825b4abd37 clan-cli: Make clan machines create use templating.py 2025-01-31 18:07:48 +07:00
Qubasa
caaafdf5f9 clan-cli: Add test_clan_nix_attrset.py and minor fixups 2025-01-31 16:36:20 +07:00
Qubasa
0db5abf56a clan-cli: Make clan flakes create discover templates from inputs. Add clan flakes list command 2025-01-30 16:24:50 +07:00
Qubasa
1f98df96e3 clan-cli: cmd.run now has its options extracted to a dataclass 2024-11-28 15:26:37 +01:00
Johannes Kirschbauer
3b7559e066 CLI: use new template path 2024-11-28 11:44:44 +01:00
a-kenji
552fb7e54a pkgs/cli: Add minimal-flake-parts to create 2024-11-08 12:34:30 +01:00
Johannes Kirschbauer
dc57c3d948 CLI: api.register type preservation 2024-09-16 12:52:28 +00:00
Jörg Thalheim
574567c1c4 use pathlib 2024-09-02 17:40:05 +02:00
Jörg Thalheim
b313f2d066 make all same-module imports relative, the rest absolute
This makes sorting more consitent.
2024-09-02 13:00:19 +02:00
Johannes Kirschbauer
fe815e5b45 Template: fix flake-parts template 2024-08-27 11:27:26 +02:00
Jörg Thalheim
8ccd8af3cc Merge remote-tracking branch 'origin/main' into rework-installation 2024-07-24 21:58:57 +02:00
Johannes Kirschbauer
1b52dca96b Fix unit tests 2024-07-24 13:15:08 +02:00
Johannes Kirschbauer
871fa8f1ff Inventory: add load_eval method 2024-07-24 10:34:10 +02:00
Jörg Thalheim
7ff296113d add option to not create a git in flakes create 2024-07-22 16:08:59 +02:00
Jörg Thalheim
05a28e596d don't setup json inventory for cli users 2024-07-22 08:22:58 +02:00
Jörg Thalheim
f04ed457db cli: default template url should come from the package itself rather than our gitea
This allow easier testing and also forks.
2024-07-22 08:22:58 +02:00
Jörg Thalheim
7ea26b1716 flake/create: fix "directory does not exist" error 2024-07-21 16:00:35 +02:00
Jörg Thalheim
5033421c52 only set git author / email when no one is set globally 2024-07-21 16:00:35 +02:00
Johannes Kirschbauer
fbe27bfa0a Classgen: add mapped keys and more stuff 2024-07-18 21:58:36 +02:00
Jörg Thalheim
64956a7a0a Revert "clan-cli: deprecate nix_shell() in favor of run_cmd()"
This reverts commit a598b878a5.
2024-07-17 14:04:49 +02:00