Commit Graph

43 Commits

Author SHA1 Message Date
Jörg Thalheim
cb8ca601e2 switch to nixos-facter for hardware-config 2025-01-15 13:59:49 +00:00
Qubasa
b9091beff9 clan-cli: Replace log.info to machine.info if applicable 2024-12-12 15:36:17 +01:00
Jörg Thalheim
bbb2aca5cb rename run_no_output to run_no_stdout
we want stderr for some nix commands.
2024-12-03 17:15:28 +01:00
Qubasa
1f98df96e3 clan-cli: cmd.run now has its options extracted to a dataclass 2024-11-28 15:26:37 +01:00
a-kenji
e0cebd005a pkgs/cli: Fix dynamic completions for update-hardware-config and it's flags
Fix dynamic completions for `update-hardware-config` and it's flags.

Now `update-hardware-config` correctly suggests machines as well as for
example `--backend` suggests correctly their respective flags.
2024-11-08 14:23:11 +01:00
Jörg Thalheim
2b05f90239 expose an option to generate hardware configuration during installation 2024-11-05 14:33:22 +01:00
Jörg Thalheim
86d8992046 generate-hardware-config: remove backup file after we are done 2024-11-04 15:05:08 +01:00
DavHau
08fb34aa01 cli: set needs_user_terminal for all ssh commands 2024-10-23 19:40:50 +07:00
Qubasa
2838e468a6 clan-cli: Fix bug where --host-key-check is not applied everywhere 2024-10-08 00:25:15 +00:00
Qubasa
5967bb347c clan-cli: Fix bug where --target_host is getting ignored 2024-10-05 18:51:44 +02:00
Jörg Thalheim
62af2bab55 fix broken eval check when nixpkgs.pkgs nixos option is used 2024-09-29 16:59:02 +02:00
Jörg Thalheim
9cf2bd4f6e make default hardware report commit message nicer 2024-09-29 16:59:02 +02:00
Jörg Thalheim
bf7246104d allow to overwrite hardware configuration
now that we call it "update" hardware configurration and we are heading
towards facter anyway, we don't need all the force overide logic. Just
allow this to be overwritten by default.
2024-09-29 16:59:02 +02:00
Jörg Thalheim
b4652539a5 wrap hardware generate arguments into an object 2024-09-29 16:59:02 +02:00
Jörg Thalheim
7816a3e639 don't expose polymorphic api 2024-09-29 16:21:53 +02:00
Jörg Thalheim
372a5f3907 remove unused location from ClanError 2024-09-29 16:21:53 +02:00
Jörg Thalheim
07e031f256 expose nixos-facter in cli 2024-09-29 16:21:53 +02:00
Jörg Thalheim
d0ed48284b use packaged nixos-facter in generate_hardware_info 2024-09-24 11:38:33 +02:00
Jörg Thalheim
8a8b473236 rename hw-generate to update-hardware-config 2024-09-20 13:42:18 +02:00
Johannes Kirschbauer
dc57c3d948 CLI: api.register type preservation 2024-09-16 12:52:28 +00:00
Jörg Thalheim
29909e49d3 apply TRY lint 2024-09-03 18:13:46 +02:00
Jörg Thalheim
1fa0e72bea use pathlib everywhere 2024-09-02 18:26:13 +02:00
Jörg Thalheim
e150b37fb8 enable ASYNC, DTZ, YTT and EM lints 2024-09-02 14:07:06 +02:00
Jörg Thalheim
109d1faf9e enable bug-bear linting rules 2024-09-02 13:26:07 +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
a0307a29b8 CLI: add option to generate facter.json 2024-08-26 09:05:01 +02:00
Jörg Thalheim
de34e058f6 hw-generate: don't load nixos-install-tools on local machine
We only need this on the target. Our installer have it already.
2024-08-24 12:07:22 +02:00
Jörg Thalheim
7ba0966da3 hw-generate: fix args 2024-08-24 12:07:22 +02:00
Johannes Kirschbauer
1e766feb40 API: prepare hw_generate for facter 2024-08-23 11:13:06 +02:00
Johannes Kirschbauer
b0d57cbdf5 API: hw_generate commit generated config 2024-08-22 16:11:08 +02:00
Johannes Kirschbauer
2d119ae750 Clan-app: generate hw report 2024-08-22 15:57:00 +02:00
Jörg Thalheim
30bbb142e2 Merge remote-tracking branch 'origin/main' into rework-installation 2024-08-21 13:38:04 +02:00
Johannes Kirschbauer
3f46d37b67 Clan-app: generate hw spec via ssh 2024-08-14 16:28:43 +02:00
Johannes Kirschbauer
68c65fb3fd API: add keyfile arg 2024-08-13 19:29:28 +02:00
Jörg Thalheim
3bbfe7fad2 hw-configure: use hostname specified in the nixos configuration 2024-07-22 16:08:59 +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
DavHau
a598b878a5 clan-cli: deprecate nix_shell() in favor of run_cmd() 2024-07-16 14:03:17 +07: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
Johannes Kirschbauer
97d8dd9816 API: init methods: hw_generate, dns discovery 2024-06-16 16:29:18 +02:00
Johannes Kirschbauer
ec1eab7e14 CLI: init hw-generate command 2024-06-15 21:31:23 +02:00