Commit Graph

2340 Commits

Author SHA1 Message Date
Johannes Kirschbauer
5727386691 Chore: re-generate nix models 2025-05-20 13:41:55 +02:00
Jörg Thalheim
2f2af072e4 upload: hide upload command by default 2025-05-20 13:37:46 +02:00
Jörg Thalheim
9c4333abcb cmd/run: dont run logging code unless we have debugging enabled. 2025-05-20 13:37:46 +02:00
Jörg Thalheim
e2af063528 upload: stream tarball rather than read at once 2025-05-20 13:37:46 +02:00
Jörg Thalheim
a954b1b423 mypy: ignore clan_lib.nixpkgs 2025-05-20 13:37:46 +02:00
lassulus
9063e4aae9 clan-cli: clan_cli.colors -> clan_lib.colors 2025-05-20 12:52:12 +02:00
lassulus
e6e74c6497 clan_cli mypy: ignore nixpkgs at new location 2025-05-20 12:51:44 +02:00
lassulus
ea7da55e86 Merge pull request 'clan-cli: clan_cli.dirs -> clan_lib.dirs' (#3706) from clan_lib_dirs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3706
2025-05-20 10:34:40 +00:00
lassulus
ed89352ea1 clan-cli: clan_cli.dirs -> clan_lib.dirs 2025-05-20 12:08:30 +02:00
Jörg Thalheim
3543315f81 use absolute path to darwin-rebuild to workaround missing login shells used on macOS 2025-05-20 10:56:44 +02:00
Jörg Thalheim
cb2ccd33a4 add workaround for nix-copy on darwin 2025-05-20 10:56:44 +02:00
Jörg Thalheim
c5ba64bd30 host.run: improve quoting of bash command 2025-05-20 10:56:44 +02:00
Jörg Thalheim
cb1703d059 drop deploy_as_root check
We haven't documented macOS support yet, so I don't expect many people
using it yet. Now that the pull request is merged probably most people
starting with darwin-nix will be on that commit anyway, so it's not
worth the check, given that the sudo version doesn't work very well.
2025-05-20 10:38:54 +02:00
Jörg Thalheim
5d5cd1feb1 custom_logger/print_trace: no longer check for run_no_stdout
this function was removed.
2025-05-20 10:09:20 +02:00
Jörg Thalheim
bbb6a1546b logger: only get file path if actually requested
this is a rather expensive operation.
2025-05-20 10:09:20 +02:00
Jörg Thalheim
5d99fb1e47 fix logger no longer applying to clan_lib
with moving code to clan_lib we are missing logging for some output. To
fix this we remove the module scoping from the logger and just set one
global logger.
2025-05-20 10:09:20 +02:00
lassulus
494705e9d3 Merge pull request 'clan-cli: clan_cli.cmd -> clan_lib.cmd' (#3705) from clan_lib_cmd into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3705
2025-05-19 17:19:55 +00:00
lassulus
9a0c6f55bd clan-cli: clan_cli.cmd -> clan_lib.cmd 2025-05-19 19:07:24 +02:00
lassulus
7ec9f20a25 Merge pull request 'fix(cli/machines/deploy): warn on local input' (#3687) from tennox/clan-core:warn-local-input into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3687
Reviewed-by: lassulus <clanlol@lassul.us>
2025-05-19 16:58:33 +00:00
lassulus
cb74273da4 clan-cli: move clan_cli.nix to clan_lib.nix 2025-05-19 18:40:36 +02:00
lassulus
1861c4447f clan_lib flake: remove redundant store definition 2025-05-19 17:49:12 +02:00
lassulus
107bc91fa1 clan_lib flake: test if cache gets invalidated with nix gc 2025-05-19 17:48:46 +02:00
lassulus
9685e00122 clan_lib flake: get select output without nixpkgs 2025-05-19 16:11:56 +02:00
lassulus
8218bd3539 clan_lib flake: get store path from NIX_STORE_DIR 2025-05-19 16:11:56 +02:00
lassulus
102fa21b9c clan_lib flake: check the whole tree even if we fetched all keys before
This is needed because nix garbage collection can remove store paths. So
the cache can become invalid because a path needs to be rebuild.
2025-05-19 16:11:56 +02:00
Jörg Thalheim
daa0e0f4e6 machines/upload: start to use builtin sudo 2025-05-19 11:18:15 +02:00
Mic92
c6284e3c48 Merge pull request 'move flake test into flake folder' (#3682) from flake-in-lib into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3682
2025-05-18 20:13:14 +00:00
lassulus
1c8b8bf83d clan_lib: move test_flake_caching into clan_lib flake folder 2025-05-18 21:35:56 +02:00
Johannes Kirschbauer
af58c32238 Docs: unify 'manual' with 'guides' folder
This is one of the final steps towards strictly following
https://diataxis.fr/
2025-05-18 20:40:40 +02:00
Manu [tennox]
2f6dc9ba17 fix(cli/machines/deploy): warn on local input
see: https://git.clan.lol/clan/clan-core/issues/3112
2025-05-17 15:30:32 +01:00
lassulus
fa052f45bd clan_lib: move clan_lib.flake.flake to clan_lib.flake 2025-05-16 19:28:36 +02:00
Johannes Kirschbauer
f33952913e Fix: typing cast dataclass_type into type explizitly 2025-05-16 18:11:46 +02:00
Johannes Kirschbauer
07b676e901 Fix: missing recipient should print a message 2025-05-16 18:09:53 +02:00
Johannes Kirschbauer
1afd5b273d Fix(cli/machines/list): make listing machines safer 2025-05-16 18:05:49 +02:00
Johannes Kirschbauer
f189eeaff4 Fix(cli/state):_Make listing state folders more safe 2025-05-16 18:05:08 +02:00
Johannes Kirschbauer
49e8164ecb Fix(cli/dirs): properly import urllib.parse module 2025-05-16 18:05:08 +02:00
Johannes Kirschbauer
b941d77cfa Fix(cli/vars): log.info; since machine is unbound in this context 2025-05-16 18:05:08 +02:00
Johannes Kirschbauer
d7c541c508 Fix: typing in async_run 2025-05-16 18:05:08 +02:00
Johannes Kirschbauer
64e3d84cab Refactor(cli): name set_inv_machine back to set_machine
We don't want to leak information about our internals
Such as 'inv' meaning 'inventory' this is not important from the outside
2025-05-16 18:05:07 +02:00
Johannes Kirschbauer
ec22a098e6 Refactor: rename api set_inv_machine parameter to 'machines,update' 2025-05-16 17:57:40 +02:00
hsjobeki
dce0ea4008 Merge pull request 'refactor: move clan_cli.error to clan_lib.error' (#3677) from hsjobeki/clan-core:chores-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3677
2025-05-16 15:17:41 +00:00
Johannes Kirschbauer
8ddf0e50d3 Fix: dynamically import clan_cli in flake methods
This is a temporary workaround to solve cyclic imports all these modules should be moved to clan_lib
soon afterwards
2025-05-16 17:02:58 +02:00
Mic92
f5191b9998 Merge pull request 'installation: put use_tor option in right place' (#3680) from installation into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3680
2025-05-16 14:43:17 +00:00
Jörg Thalheim
41598b8f34 machines.eval_nix: remove unused refresh parameter 2025-05-16 16:31:25 +02:00
Jörg Thalheim
13c6543a88 installation: put use_tor option in right place
we would always disable tor, even if enabled.
2025-05-16 16:18:25 +02:00
Johannes Kirschbauer
fe0507b47c refactor: move clan_cli.error to clan_lib.error 2025-05-16 16:14:39 +02:00
Mic92
73fd4b00d0 Merge pull request 'upload: don't try to re-create directory if it already exists' (#3678) from upload into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3678
2025-05-16 13:53:05 +00:00
Jörg Thalheim
3d743960a4 upload: don't try to re-create directory if it already exists
This allows bind mounts i.e. needed for preserveration/impermanence
2025-05-16 15:39:09 +02:00
lassulus
5423b9af41 clan_cli: move flake class to clan_lib 2025-05-16 13:38:47 +02:00
hsjobeki
5a1bd4447e Merge pull request 'Refactor: replace direct references to inventory' (#3674) from hsjobeki/clan-core:chores-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3674
2025-05-16 10:43:24 +00:00