Qubasa
8ff060c589
clan_lib: Remote add to arguments override func
2025-09-22 11:20:49 +02:00
Christian Friedow
196d7c95c0
fix: add missing --host-key-check option
2025-09-11 14:30:48 +02:00
Jörg Thalheim
4cb17d42e1
PLR2004: fix
2025-08-26 16:21:15 +02:00
Jörg Thalheim
d5b09f18ed
RET504: fix
2025-08-26 15:55:23 +02:00
Jörg Thalheim
cb9c8e5b5a
try{300,301,400}: fix
2025-08-26 15:17:16 +02:00
Jörg Thalheim
b2a54f5b0d
PLC0415: fix
2025-08-26 14:46:42 +02:00
Jörg Thalheim
ac20514a8e
EXE001: fix
2025-08-26 12:01:47 +02:00
Jörg Thalheim
c9a709783a
BLE001: fix
2025-08-26 12:01:47 +02:00
Jörg Thalheim
8f8426de52
PGH003: fix
2025-08-26 11:36:38 +02:00
Jörg Thalheim
b38b10c9a6
automatic ruff fixes
2025-08-26 11:07:57 +02:00
Jörg Thalheim
1d0e0f243e
PLW2901: fix
2025-08-25 15:17:06 +02:00
Mic92
05665b1c7e
Merge pull request 'ruff-3-arg-fixes' ( #4934 ) from ruff-3-arg-fixes into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4934
2025-08-25 12:54:04 +00:00
Jörg Thalheim
04457b1272
ARG001: fix
2025-08-25 14:46:12 +02:00
Jörg Thalheim
4986fe30c3
ARG002/ARG005: fix
2025-08-25 14:36:36 +02:00
Jörg Thalheim
03a4ac5bde
sudo_askpass_proxy: check for stdin before print
2025-08-25 14:11:25 +02:00
Jörg Thalheim
6a2dfb8176
S101: fix
2025-08-25 14:11:25 +02:00
Jörg Thalheim
332d10e306
s110: address
2025-08-25 14:07:59 +02:00
Jörg Thalheim
1c24b4c6cb
S604: fix
2025-08-25 14:07:59 +02:00
Jörg Thalheim
0a70ed6268
S108: ignore our uses
2025-08-25 13:43:33 +02:00
Jörg Thalheim
dc5485d9f1
ruff: replace asserts outside of tests with Exceptions
2025-08-25 13:06:04 +02:00
Jörg Thalheim
ea2d6aab65
ruff: apply automatic fixes
2025-08-25 11:34:41 +02:00
Qubasa
101c52f7c2
clan_lib: Add 'address' field to LocalHost
2025-08-20 20:28:21 +02:00
hsjobeki
cc8dd0564b
Merge pull request 'askpass: use protocol as interface' ( #4739 ) from interface-askpass into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4739
2025-08-13 17:43:01 +00:00
Johannes Kirschbauer
6fa2a977df
askpass: use protocol as interface
...
Avoids a cyclic dependency on the Remote class
Strips down the dependency closure by explizitly declaring what functions it needs
2025-08-13 19:21:18 +02:00
Johannes Kirschbauer
6bd8839128
lib/Remote: Unify class method _parse_ssh_uri with class file
2025-08-13 18:26:28 +02:00
DavHau
adccef4757
install: fix torify package not available
2025-08-13 12:04:14 +07:00
lassulus
c14a5fcc69
refactor: move ssh/upload.py from cli to lib
...
Move the upload module to clan_lib to better organize SSH-related
utilities. Updated all imports across the codebase.
2025-08-13 12:04:14 +07:00
DavHau
89cb22147c
Revert "machines update: support --target-host localhost"
...
This reverts commit a2818d4946cc66a08b9dd7a1ab95dc48ea708fe3.
Setting `--target-host localhost` breaks with:
sudo: no askpass program specified, try setting SUDO_ASKPASS
2025-08-12 17:39:40 +07:00
DavHau
26559ff88b
Merge pull request 'machines update: support --target-host localhost' ( #4623 ) from jfly/clan-core:localhost-as-target-host-without-ssh into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4623
2025-08-12 05:10:53 +00:00
DavHau
df90fb20a0
clan-lib/hosts: reintroduce test for localhost
2025-08-12 10:18:55 +07:00
Johannes Kirschbauer
1df9b6e97d
Remote: set default for commance_prefix
2025-08-08 22:48:19 +02:00
Johannes Kirschbauer
58fa7ac32b
Host: convert to proctocol to avoid forced inheritance
2025-08-08 22:33:05 +02:00
Johannes Kirschbauer
ccb9340478
Host: add None as default to command_prefix
2025-08-08 20:55:54 +02:00
Jeremy Fleischman
1129862293
machines update: support --target-host localhost
...
This is basically
<af7ce9b8ed >,
but with support for deploying locally.
This failed to install secrets to `/var/lib/sops-nix`. That's because
our `LocalHost` didn't have support for sudo yet. I fixed that.
2025-08-08 12:42:26 +00:00
DavHau
b74193514d
ssh: refactor callers to use new Host interface
2025-08-05 13:16:59 +02:00
DavHau
c33fd4e504
ssh: Introduce LocalHost vs. Remote via Host interface
...
Motivation: local builds and deployments without ssh
Add a new interface `Host` which is implemented bei either `Remote` or `Localhost`
This simplifies all interactions with hosts. THe caller does ot need to know if the Host is remote or local in mot cases anymore
2025-08-05 13:16:59 +02:00
Qubasa
0b05b0b1ec
docs: review fixups
...
docs: review fixups
docs: review fixups
docs: fixup links in cli
docs: fixup links in cli
2025-08-01 14:53:31 +07:00
Qubasa
62a3503987
clan-lib: Always set a static private key for nixos-anywhere, to make --phases work properly
2025-07-31 17:06:00 +07:00
a-kenji
7ef09343ed
pkgs/clan/lib: Fix documentation of from_ssh_uri in the Remote class
2025-07-29 17:37:50 +02:00
lassulus
1a5b77d47a
refactor: generalize Tor support to SOCKS5 proxy in network module
...
- Replace Tor-specific implementation with generic SOCKS5 proxy support
- Change `tor_socks` boolean to `socks_port` and `socks_wrapper` parameters
- Move Tor functionality to clan_lib.network.tor submodule
- Add connection context managers to NetworkTechnologyBase
- Improve network abstraction with proper remote() and connection() methods
- Update all callers to use new SOCKS5 proxy interface
- Fix network ping command to properly handle connection contexts
This allows for more flexible proxy configurations beyond just Tor,
while maintaining backward compatibility for Tor usage.
2025-07-24 22:26:44 +02:00
Qubasa
cfba97eee5
clan-cli: Reference HostKeyCheck literal instead of duplicating the list everywhere
2025-07-16 13:12:48 +07:00
Qubasa
f8a0943fbd
clan-cli: Fix incorrect ipv6 check in check_machine_ssh_reachable
2025-07-16 12:34:30 +07:00
a-kenji
e342996306
pkgs/cli: Fix ssh logging
...
Fix the ssh logging level.
Currently the ssh commands is printed every time on an ssh connection.
While seeing the command is useful, we should print this when running
clan with the `--debug` flag.
2025-07-15 14:20:40 +02:00
Qubasa
e8b5e2c2c5
clan-cli: Fixup clan install which depends on ssh_parseargs.
...
clan-cli: Remove --ssh-option for now, as it can't work in current state
clan-cli: Remove nix_config from test as its impure
2025-07-14 20:47:49 +07:00
Qubasa
9630b6dbe4
clan-cli: Make 'clan ssh' read out the targetHost to connect to
2025-07-14 19:35:48 +07:00
Qubasa
f854c39292
clan-cli: Fix regression in ruff linter, where linter rules got overriden by local pyproject.toml
...
clan-app: Fix ruff regression where linter rules got overriden by local pyproject.toml
2025-07-08 17:23:32 +07:00
Johannes Kirschbauer
b409913229
docs/api: add docstrings to {check_machine_ssh_login}
2025-07-07 15:38:09 +02:00
Johannes Kirschbauer
aacc6dfad8
api/check_machine_ssh_reachable: add function docs
2025-07-07 15:02:35 +02:00
Johannes Kirschbauer
6560738502
api/machine checks: rename, add checkResult
2025-07-07 13:13:00 +02:00
lassulus
045b250f9a
Revert "make host key check an enum instead of an literal type"
...
This reverts commit 3d83017acd .
2025-07-06 14:51:19 +02:00