Louis Opter
c132811c9e
Update outdated help messages and fix a typo
2024-09-29 15:52:58 +00:00
Jörg Thalheim
e58b0df2db
fix broken eval check when nixpkgs.pkgs nixos option is used
2024-09-29 16:59:02 +02:00
Jörg Thalheim
5c6a0be70c
make default hardware report commit message nicer
2024-09-29 16:59:02 +02:00
Jörg Thalheim
bd8bc98863
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
deea4a74b3
wrap hardware generate arguments into an object
2024-09-29 16:59:02 +02:00
Jörg Thalheim
b97ee66e8f
don't expose polymorphic api
2024-09-29 16:21:53 +02:00
Jörg Thalheim
84cb54a537
remove unused location from ClanError
2024-09-29 16:21:53 +02:00
Jörg Thalheim
d4685e7208
put error description in same line as error for cli
2024-09-29 16:21:53 +02:00
Jörg Thalheim
11409b9608
if error doesn't have a message set, print a stack trace
2024-09-29 16:21:53 +02:00
Jörg Thalheim
6bd1bc894e
if command fails, print command and exit code, regardless if error message is set
2024-09-29 16:21:53 +02:00
Jörg Thalheim
7b93ef6704
expose nixos-facter in cli
2024-09-29 16:21:53 +02:00
Qubasa
1b0b111f03
clan flash: Remove root requirement for flash, add a flash-template
2024-09-24 13:42:21 +02:00
Jörg Thalheim
5b878ac8ac
use packaged nixos-facter in generate_hardware_info
2024-09-24 11:38:33 +02:00
Qubasa
d4e8f88185
clan-cli: Move clan machines import to clan machines create
2024-09-23 17:11:48 +02:00
Jörg Thalheim
3a87d5a6ec
f2fs: enable compression
2024-09-20 15:52:11 +00:00
DavHau
0324f4d4b8
vars/sops: improve shared secrets, switching backend
...
When a second machine checks for a shared secret, now the exists() call returns negative and only when updating the secrets for that machine, the machine is added to the sops receivers.
Also throw proper errors when the user switches backends without cleaning the files first.
2024-09-20 15:06:54 +02:00
Jörg Thalheim
b4fb4f180b
rename hw-generate to update-hardware-config
2024-09-20 13:42:18 +02:00
DavHau
501ade7de7
vars: implement migration
...
Migrating generated files from the facts subsystem to the vars subsystem is now possible.
HowTo:
1. declare `clan.core.vars.generators.<generator>.migrateFact = my_service` where `my_service` refers to a service from `clan.core.facts.services`
2. run `clan vers generate your_machine` or `clan machines update your_machine`
Vars will only be migrated for a generator if:
1. The facts service specified via `migrateFact` does exist
2. None of the vars to generate exist yet
3. All public var names exist in the public facts store
4. All secret var names exist in the secret fact store
If the migration is deemed possible, the generator script will not be executed. Instead the files from the public or secret facts store are read and stored into the corresponding vars store
2024-09-19 17:57:03 +02:00
DavHau
89d39186ee
vars/generate: improve output when vars are updated
...
fixes #2076
- print old and new value if possible
- also inform the user if something hasn't changed
2024-09-18 16:57:01 +02:00
Johannes Kirschbauer
cfa1fca76e
Inventory: docs fixup
2024-09-18 08:31:00 +02:00
DavHau
1c56ef5725
vars: allow setting a default for values
2024-09-17 21:11:38 +02:00
DavHau
ec109e7f67
vars: generate vars for clan install
...
fixes #2087
2024-09-17 20:41:39 +02:00
DavHau
cf47c1d51a
vars: generate proper commit messages
...
fixes #2126
2024-09-17 20:22:18 +02:00
Johannes Kirschbauer
56b76f9827
Inventory: docs improvements
2024-09-16 22:52:40 +02:00
DavHau
9ffc3da52b
vars/tests: fix nix eval triggering git concurrent access
...
Prevents this error: Another git process seems to be running in this repository
2024-09-16 18:58:22 +02:00
Qubasa
0f0a8825e1
clan-cli: Init clan machines import
2024-09-16 18:15:55 +02:00
Johannes Kirschbauer
0addba0d20
Update: inventory classes check
2024-09-16 12:52:28 +00:00
Johannes Kirschbauer
b4e3dff23b
CLI: api.register type preservation
2024-09-16 12:52:28 +00:00
Johannes Kirschbauer
cf24170d0d
CLI: update classes
2024-09-16 12:52:28 +00:00
Johannes Kirschbauer
ca79433aa9
CLI: use abstract schema to avoid module imports
2024-09-15 18:42:50 +02:00
Qubasa
1680625260
clan-cli: Moved flash to own subcommand
2024-09-15 15:53:17 +02:00
Qubasa
58f2650cb1
clan-app: Fix flash API
2024-09-15 11:43:40 +02:00
Qubasa
aa1285b415
flash: Replace disks[str,str] with list[Disk] type
2024-09-15 11:43:40 +02:00
Qubasa
6e9121a881
flash: Fix gnome automounting bug
2024-09-14 18:11:41 +02:00
Johannes Kirschbauer
2953aefe9d
UI: fix breakage in disk id api
2024-09-13 16:44:35 +02:00
Johannes Kirschbauer
95f587d652
UI: migrate admin service api bindings
2024-09-13 16:11:10 +02:00
Johannes Kirschbauer
91a9fb23be
API: rename set_inventory
2024-09-13 16:11:10 +02:00
Johannes Kirschbauer
fd15bf4f5c
Serde: support deserialise Any typed values
2024-09-13 16:11:10 +02:00
Qubasa
8c3bfd498d
flash: Use f2fs for installer
2024-09-13 15:48:57 +02:00
Qubasa
787599ebb6
clanCore: init machine_id_v3
2024-09-13 12:17:49 +02:00
DavHau
a1dd10f502
vars/sops/shared: add machines key on demand
2024-09-12 20:17:05 +02:00
clan-bot
2fc5572ff7
Merge pull request 'API: remove all python dataclasses for clanModules (services)' ( #2080 ) from hsjobeki/clan-core:hsjobeki-main into main
2024-09-12 16:37:51 +00:00
Johannes Kirschbauer
e1eaf44ae5
UI: update gitignore
2024-09-12 18:33:47 +02:00
Johannes Kirschbauer
c554d7ddfb
UI: include inventory schema and generated types
2024-09-12 18:22:46 +02:00
DavHau
067d287398
vars/list: display '<not set>' also for secrets
2024-09-12 17:24:29 +02:00
DavHau
53592837a9
vars: get rid of meta.json
2024-09-12 16:52:44 +02:00
DavHau
3c27cc31e9
vars/sops: load sops info from nix instead of filesystem
2024-09-12 16:30:21 +02:00
Johannes Kirschbauer
f2a2b8e893
API: type all services with dict[str,Any] in python to reduce complexity.
2024-09-12 16:19:51 +02:00
Johannes Kirschbauer
39518d302b
API: remove all python dataclasses for clanModules (services)
2024-09-12 16:19:51 +02:00
a-kenji
66c0517dfe
clanModules/state-version: init state-version
...
This adds a clanModule that will initialize the `system.stateVersion`
upon deploying the machine for the first time.
If the machine is completely reinstalled, then the state version might be
regenerated. But care should be taken if rebuilding from backups.
2024-09-12 15:47:30 +02:00