Johannes Kirschbauer
c5001f19fc
Revert "remove nix_shell_legacy"
...
This reverts commit f3512b853a .
2025-04-18 14:49:54 +02:00
Jörg Thalheim
f3512b853a
remove nix_shell_legacy
2025-04-16 21:03:58 +02:00
Jörg Thalheim
435627d854
rename CLAN_STATIC_PROGRAMS -> CLAN_PROVIDED_PACKAGES
2025-04-16 18:27:01 +00:00
Jörg Thalheim
837789010e
rename nix_shell_legacy to nix_shell and run_cmd to nix_shell
...
Than it's more obvious that we need to migrate.
2025-04-16 18:27:01 +00:00
Jörg Thalheim
9222574258
run_cmd: print what commands are allowed in if the current command is not in the allow list
2025-04-16 19:50:27 +02:00
Jörg Thalheim
7e6e51ee1b
sort allowed-programs.json
2025-04-16 19:32:40 +02:00
Jörg Thalheim
3e8f3046ec
Host: migrate from nix_shell to run_cmd
2025-04-16 19:32:40 +02:00
Mic92
dc6cf1b673
Merge pull request 'cache nix_config' ( #3306 ) from nix-config into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3306
2025-04-14 11:23:33 +00:00
Jörg Thalheim
268be9e1f3
cache nix_config
...
We often call this several times during execution.
At the moment we only use system at the moment, which is unlikely to
change.
2025-04-14 13:13:49 +02:00
Qubasa
3fbc661ed9
clan-cli: Change shellcheck to shellcheck-minimal
2025-04-10 01:54:00 +02:00
Qubasa
6b28e4e1d7
clan-cli: Add shellcheck as a runtimeDependencie
2025-04-09 19:44:00 +02:00
lassulus
0104c41921
clan-cli: another try to fix the CI bug
2025-02-27 08:24:28 +01:00
Pablo Ovelleiro Corral
0d001e21b9
Create directory
2025-02-16 17:08:54 +00:00
Pablo Ovelleiro Corral
e621aa1a34
Fix locking
2025-02-16 17:08:54 +00:00
lassulus
451d865109
cli: nix_add_to_gcroots: don't run in sandboxed tests
2025-02-15 09:59:41 +00:00
Qubasa
84b8838084
clan-cli: Add ruff to devShell again. Add missing type annotations
2025-01-29 19:16:34 +07:00
Qubasa
06a85faca6
clan-app: Add gpg to allowed-programs.json
2025-01-11 10:52:22 +07:00
lassulus
83a38909c0
cli nix_build: don't create output symlink if no gcroot is given
2024-12-14 13:38:51 +01:00
Qubasa
6b784f8623
clan-cli: Rework 'clan ssh' command, improve Tor support.
2024-12-13 00:11:18 +01:00
Qubasa
65a5789c5b
clan-cli: Replace HostGroup and MachineGroup with generic AsyncRuntime class. Propagate cmd prefix over thread local. Close threads on CTRL+C
2024-12-09 18:07:23 +01:00
Jörg Thalheim
95adf200ac
remove incorrect usage of tempdir for sandbox directories
...
The flags out-live the temporary directory
2024-12-05 11:38:58 +01:00
Jörg Thalheim
e2ed57f8dd
extract nix_test_store helper for sandbox builds
2024-12-05 11:38:58 +01:00
Jörg Thalheim
dbcf6780ab
only enable show-trace if we run in debug mode
2024-12-04 14:54:47 +01:00
Michael Hoang
b9d922eaac
Add --print-build-logs to some Nix commands
2024-12-04 10:04:07 +11: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
DavHau
44e6fe803f
vars: make all python tests work in nix sandbox
...
- generate a flake.lock file for each template by copying the clan-core flake.lock and modifying it
- call nix build with --store for tests inside the sandbox
2024-11-27 14:32:02 +07:00
DavHau
a5ec3c45d5
clan-cli: remove --no-write-lock-file from nix invocations
2024-11-14 14:11:06 +07:00
Jörg Thalheim
f9a42831e4
start to name temporary directories in more places
2024-10-01 18:57:59 +02:00
Jörg Thalheim
5ac3ac63c2
get rid of ValueError
2024-09-03 18:14:31 +02: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
cb16cda3fa
add RET, Q, RSE lint
2024-09-02 15:58:49 +02:00
Jörg Thalheim
e150b37fb8
enable ASYNC, DTZ, YTT and EM lints
2024-09-02 14:07:06 +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
Qubasa
f0a9a7a02b
clan-cli: Add --show-trace to nix build and nixos-rebuild commands
2024-08-12 22:27:54 +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
Johannes Kirschbauer
d7bf84e3be
cli: add programms to allowed list
2024-07-16 13:49:16 +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
DavHau
430adc875a
clan-cli: improve runtime dependency management
...
Many dependencies of clan-cli are currently dynamically loaded via nix-shell on each execution.
This is nice, as it reduces the initial closure size of clan, but the overhead introduced by nix-shell piles up quickly, as some commands shell out many times during their lifetime. For example, when adding a secret git is called 10+ times.
This reduces the time of a test which adds a secret from around 50 seconds to 15 seconds.
- add run_cmd() as an alternative to nix_shell()
- introduce the concept of static dependencies which do not need to go through nix-shell
- static dependencies are defined at build time and included into the wrapper for clan-cli
- add package: clan-cli-full which statically ships all required dependencies
TODO: deprecate nix_shell() in favor of run_cmd()
2024-07-11 15:34:41 +07:00