Commit Graph

165 Commits

Author SHA1 Message Date
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
DavHau
a598b878a5 clan-cli: deprecate nix_shell() in favor of run_cmd() 2024-07-16 14:03:17 +07:00
DavHau
e7d5a6f854 impure-checks: improve performance by disabling dynamic deps 2024-07-16 12:42:45 +07:00
Mic92
a3e2b76517 Merge branch 'main' into DavHau-dave 2024-07-09 09:33:11 +00:00
DavHau
941cf9fb9d vars: implement generating public variables via in_repo 2024-07-09 14:26:56 +07:00
Johannes Kirschbauer
edcc1a5cb2 Test: fixup 2024-07-06 17:51:46 +02:00
DavHau
79d6f8e893 Reapply "clan.core: rename clan.{deployment,networking} -> clan.core.{deployment,networking}"
This reverts commit 71009f80d8.

workaround upstream bug: https://github.com/NixOS/nixpkgs/issues/324802
2024-07-05 19:29:01 +07:00
Jörg Thalheim
71009f80d8 Revert "clan.core: rename clan.{deployment,networking} -> clan.core.{deployment,networking}"
This reverts commit 18b64f2d0b.

The old configuration cannot be updated like this:

eve] error:
[eve]        … while calling the 'head' builtin
[eve]          at /nix/store/5b0hl2dnvr1sawqlkwmsnaiyqz00d34h-source/lib/attrsets.nix:1575:11:
[eve]          1574|         || pred here (elemAt values 1) (head values) then
[eve]          1575|           head values
[eve]              |           ^
[eve]          1576|         else
[eve]
[eve]        … while evaluating the attribute 'value'
[eve]          at /nix/store/5b0hl2dnvr1sawqlkwmsnaiyqz00d34h-source/lib/modules.nix:809:9:
[eve]           808|     in warnDeprecation opt //
[eve]           809|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
[eve]              |         ^
[eve]           810|         inherit (res.defsFinal') highestPrio;
[eve]
[eve]        … while evaluating the option `system.build.toplevel':
[eve]
[eve]        … while evaluating definitions from `/nix/store/5b0hl2dnvr1sawqlkwmsnaiyqz00d34h-source/nixos/modules/system/activation/top-level.nix':
[eve]
[eve]        … while evaluating the option `assertions':
[eve]
[eve]        … while evaluating definitions from `/nix/store/5b0hl2dnvr1sawqlkwmsnaiyqz00d34h-source/nixos/modules/system/boot/systemd.nix':
[eve]
[eve]        … while evaluating the option `systemd.services':
[eve]
[eve]        … while evaluating definitions from `/nix/store/kpzcdgndym0qm1w490mjvk9c2qmz03h5-source/nixosModules/clanCore/zerotier':
[eve]
[eve]        … while evaluating the option `clan.core.networking.zerotier.networkId':
[eve]
[eve]        (stack trace truncated; use '--show-trace' to show the full, detailed trace)
[eve]
[eve]        error: A definition for option `clan.core.networking.zerotier.networkId' is not of type `null or string'. Definition values:
[eve]        - In `/nix/store/kpzcdgndym0qm1w490mjvk9c2qmz03h5-source/nixosModules/clanCore/networking.nix':
[eve]            {
[eve]              _type = "override";
[eve]              content = "267efd4a15b69623";
[eve]              priorit
2024-07-05 11:16:05 +02:00
DavHau
18b64f2d0b clan.core: rename clan.{deployment,networking} -> clan.core.{deployment,networking} 2024-07-04 17:05:37 +07:00
Jörg Thalheim
6037ad1ce0 move FlakeId to flake id
move FlakeId to flake id
2024-07-03 18:28:55 +02:00
clan-bot
842d9a360c Merge pull request 'refactor-machine' (#1691) from refactor-machine into main 2024-07-03 10:48:09 +00:00
Jörg Thalheim
2f1dac6962 make machine class now a dataclass 2024-07-03 12:34:43 +02:00
Johannes Kirschbauer
3227de583f API: tests for module instance update 2024-07-02 16:09:13 +02:00
Jörg Thalheim
cc3f99bfaa simplify clan uri further 2024-07-02 12:52:10 +02:00
clan-bot
6cf0cc491e Merge pull request 'machines/machines: drop unused qmp wrapper' (#1683) from Mic92-main into main 2024-07-02 10:01:43 +00:00
Jörg Thalheim
466fac640f machines/machines: drop unused qmp wrapper 2024-07-02 11:42:02 +02:00
Johannes Kirschbauer
a71fd47354 Inventory persistence improves error resistance 2024-07-02 11:16:54 +02:00
Johannes Kirschbauer
1efadb5e3d API: migrate machines delete and list to inventory 2024-07-02 11:07:11 +02:00
Johannes Kirschbauer
4a61e51afd API: migrate add machine to inventory 2024-07-01 21:55:42 +02:00
DavHau
4db2e8303f refactor: rename clanCore -> clan.core 2024-06-18 18:32:40 +07:00
Johannes Kirschbauer
97d8dd9816 API: init methods: hw_generate, dns discovery 2024-06-16 16:29:18 +02:00
Johannes Kirschbauer
0826c2bce0 Docs: update machine hardware config instructions 2024-06-15 22:27:46 +02:00
Johannes Kirschbauer
ec1eab7e14 CLI: init hw-generate command 2024-06-15 21:31:23 +02:00
DavHau
8eafd43fd3 tests: add test for creating machine on minimal clan 2024-06-09 21:54:04 -07:00
a-kenji
4df6567915 clan: add dynamic completion to clan machines show 2024-06-03 17:06:03 +02:00
Qubasa
cca39c4839 clan-cli: Refactor machines/update.py to cmd.run 2024-06-02 10:00:23 +02:00
clan-bot
2ac4294ff9 Merge pull request 'split list machines into show machine command' (#1521) from machines-show into main 2024-05-31 15:00:03 +00:00
Jörg Thalheim
84f75de34c split list machines into show machine command 2024-05-31 16:56:09 +02:00
a-kenji
32a20caad4 clan: add dynamic completions
Add dynamic completion scaffolding to the clan `cli`.
Also add a dynamic completion mechanism for machines for commands that
have machines as their sole argument.

More intricate dynamic completions will be implemented in follow up
PR's.
2024-05-31 12:55:41 +02:00
Jörg Thalheim
fc3f65fb57 allow to override nix options in update/install/flash commands 2024-05-29 10:14:14 +02:00
a-kenji
12add74aae clan: add run_no_stdout function suppressing stdout
Add the `run_no_stdout` function suppressing stdout by default.This
keeps the noise down on most commands, while still
stayingdebuggable.Stdout will be active when the `--debug` flag is
passed to the cli.

Fixes #1443
2024-05-28 11:13:55 +02:00
a-kenji
b379b3b1fd clan: machines --help add examples to help output 2024-05-27 21:01:05 +02:00
a-kenji
578fc55e40 clan: facts generate allow regeneration of facts
Add `--regenerate` flag to `clan facts generate` which allows forcing
the generation of facts, regardless of their current existence.

Examples:
```
clan facts generate [MACHINE] --regenerate
```
or
```
clan facts generate [MACHINE] --service [SERVICE] --regenerate
```
2024-05-26 22:55:48 +02:00
clan-bot
6b15862f12 Merge pull request 'clan: facts generate specific service' (#1446) from a-kenji-feat/clan/facts-generate-service-1395 into main 2024-05-26 19:57:17 +00:00
a-kenji
4e87389a4d clan: facts generate specific service
Add `--service` flag to the `clan` cli which allows specifying a certain
service to be generated.

Example:

```
clan facts generate [MACHINE] --service [SERVICE]
```

Fixes #1395
2024-05-26 21:52:56 +02:00
Johannes Kirschbauer
2d9be0e603 API: handle functions with multiple arguments 2024-05-26 18:04:49 +02:00
Johannes Kirschbauer
5e266578ae Api: init response envelop 2024-05-26 15:57:10 +02:00
Johannes Kirschbauer
1dafa44ab8 api: convert name casing 2024-05-26 13:54:21 +02:00
Johannes Kirschbauer
27ecbca557 api: improve message serialisation 2024-05-26 13:40:47 +02:00
a-kenji
5d0a0762b3 clan machines list: reduce noise
Don't log nix error output by default on `clan machines list`.
Log it, if `--debug` is passed.

Fixes #1115
2024-05-24 12:55:14 +02:00
Johannes Kirschbauer
13678606e7 api: fix typing issues 2024-05-21 16:01:57 +02:00
Johannes Kirschbauer
53548eb56e clan ui: move print into log.debug statements 2024-05-20 19:59:50 +02:00
Johannes Kirschbauer
8d77525664 clan ui: setup typed api method 2024-05-20 19:34:49 +02:00
Qubasa
bae03fa338 Add --no-reboot flag to clan machine install 2024-05-14 15:41:15 +02:00
clan-bot
30a82d0a2f Merge pull request 'clan-cli: add --json and --png flags to machine install' (#1320) from a-kenji-feat/clan-install-json into main 2024-05-07 12:52:21 +00:00
a-kenji
c7e662806f clan-cli: add --json and --png flags to machine install
Allow using `clan machines [machine] install` in conjunction with the
`--json` and `--png` flags.

Fixes #1180
2024-05-07 14:47:13 +02:00
Johannes Kirschbauer
964625630e add cli docs generator 2024-04-30 18:53:00 +02:00
a-kenji
458a27cf1a clan(help): improve install description 2024-04-26 11:42:18 +02:00
a-kenji
b30bc64bee clan: clan machines install use verbose flag 2024-04-19 16:38:39 +02:00
Jörg Thalheim
033e5194fb refactor facts command to regenerate facts for all machines 2024-04-15 22:14:54 +02:00