Commit Graph

94 Commits

Author SHA1 Message Date
Jörg Thalheim
00984ec581 add inputs to specialArgs and make templates use it. 2025-05-30 19:53:12 +02:00
Qubasa
2f0114a236 clan-cli: Unify list_machines and use flake caching 2025-05-16 10:47:49 +02:00
Johannes Kirschbauer
258a5602ad fix: make sure legacyModules dont end up in localModules for inventory.instances 2025-05-08 17:38:28 +02:00
Johannes Kirschbauer
b71e5378d6 Refactor(inventory/modules): add support for local clan.modules and migrate all checks 2025-05-08 17:17:46 +02:00
Johannes Kirschbauer
c78b736dd5 chore: deprecate usage of inventory.modules in favor of clan.modules 2025-05-07 19:12:07 +02:00
Johannes Kirschbauer
3c7f08ebaf fix(tests/modules): list_modules returns moduleSets" 2025-05-07 16:46:13 +02:00
Johannes Kirschbauer
cb8be5015b feat(modules): derive module list from inputs and local modules 2025-05-06 18:57:54 +02:00
hsjobeki
f6b0b5ada5 Merge pull request 'API(cli): add method to Flake class to allow calling nix functions' (#3502) from hsjobeki/clan-core:improvements-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3502
2025-05-05 20:16:28 +00:00
Johannes Kirschbauer
dfa5a228e8 feat(clanLib): init evalServiceSchema 2025-05-05 21:55:29 +02:00
Johannes Kirschbauer
c88c68749e API(clanInternals): add 'evalServiceSchema' endpoint 2025-05-05 21:46:20 +02:00
Johannes Kirschbauer
2d5e337f81 tests: add error prefix for json schema in checks 2025-05-05 21:46:16 +02:00
hsjobeki
617b87b29e Merge pull request 'Refactor(inventory): move prio 'introspection' into inventoryClass to minimize the 'clanInternals' api' (#3440) from hsjobeki/clan-core:ui-fixups into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3440
2025-04-30 10:24:34 +00:00
Johannes Kirschbauer
0d003f5424 Refactor(inventory): move prio 'introspection' into inventoryClass to minimize the 'clanInternals' api 2025-04-30 11:02:58 +02:00
Brian McGee
651b277bb9 feat: configure age plugins for SOPS in buildClan 2025-04-29 16:02:32 +10:00
DavHau
cbdfe35748 build-clan: Throw better error when _class is not provided by nixpkgs 2025-04-28 15:49:14 +00:00
Johannes Kirschbauer
fbd291ba11 chore: remove unused moduleSchemas and related API endpoint for legacy modules
We didn't reach the state where we would display these schemas in the
UI.
We might need to wire this up in a similar way for the newer
clan.services
2025-04-27 13:14:09 +02:00
Johannes Kirschbauer
06e2fcf9fa refactor: rename clanLib.values to introspection 2025-04-27 13:10:42 +02:00
Michael Hoang
5e61a6e41d nixosModules/clanCore: support nix-darwin 2025-04-22 23:14:03 +10:00
Michael Hoang
40a3f6abce build-clan: fix constructing nix-darwin machines 2025-04-17 20:23:54 +02:00
Johannes Kirschbauer
bc9bb5d405 feat(buildClan): expose {nixosModules,darwinModules} from clanInternals
These are the exact same modules that where used internally to construct the corresponding
'nixosConfiguration', 'darwinConfiguration'
They can be externally used, and would yield the same result
Given that you pass the same 'specialArgs'
2025-04-15 17:25:57 +02:00
Johannes Kirschbauer
256194575d refactor(buildClan): simplify pkgs overriding logic 2025-04-15 16:05:57 +02:00
Johannes Kirschbauer
2ceefcd44d refactor(buildClan): move modules into 'forName' and import the correct core module depending on class 2025-04-15 15:29:01 +02:00
Johannes Kirschbauer
bb0ca2065d fixup(buildClan): use clan.inventory instead of refering to the clanInternals dumping ground within the module 2025-04-15 15:10:08 +02:00
Johannes Kirschbauer
d2c068c4a1 fixup(buildClan): split up the inner-module into: {forSystem, forName}
I am preparing this such that we can move the forName modules into the
defaults for the deferred module outputs and the forSystem modules are
added later and only for the 'configsPerSystem' where we actually need
the system modules
2025-04-15 15:02:37 +02:00
Johannes Kirschbauer
a0da225282 refactor: buildClan output; output deferred modules instead of nixosConfig 2025-04-15 14:25:02 +02:00
Michael Hoang
9c317e8f3b build-clan: drop unused machinesFunc 2025-04-15 13:30:28 +02:00
Michael Hoang
1d159fb774 build-clan: expose Clan configuration as a module 2025-04-14 16:04:06 +02:00
Johannes Kirschbauer
cd11835ec4 Reapply "Merge pull request 'chore(buildClan): move machineClass option into inventory.machines submodule' (#3259) from hsjobeki/clan-core:buildclan-cleanup into main"
This reverts commit 6154b4cb3a.
2025-04-09 18:16:35 +02:00
Johannes Kirschbauer
9f159084cd feat(buildInventory): move instance resolution into buildInventory
Such that buildClan doesn't have to compose the results
buildInventory should be more self contained. But it is NOT meant a
public API! use buildClan argument 'inventory' instead
2025-04-09 17:31:35 +02:00
Johannes Kirschbauer
e37f16f47a treewide(clanLib): rename all occurences of {clan-core,self}.lib to 'clanLib' 2025-04-09 11:32:46 +02:00
Michael Hoang
b5a57a72a0 build-clan: support constructing darwinConfigurations 2025-04-08 08:53:29 +02:00
hsjobeki
d15ac22d41 Merge pull request 'chore(lib/select): move into subfolder with a test file' (#3175) from hsjobeki/clan-core:lib-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3175
2025-04-04 12:32:32 +00:00
DavHau
e540b82dc6 remove default for clan.core.settings.machine.name and make readOnly
There is not reason that there needs to be a default. Machines are usually defined as an attrset, so there is no reason to have a default.
Also make this readOnly as we never want to override it.
2025-04-03 17:29:07 +07:00
Johannes Kirschbauer
542a6a3fd1 feat(buildClan): add clan.modules as output 2025-04-02 13:38:38 +02:00
Johannes Kirschbauer
6e16d1345e chore(lib/treewide): cleanup directory struture of lib. See lib/readme.md for details 2025-04-02 11:11:21 +02:00
Johannes Kirschbauer
d69a074366 chore(buildClan): make buildClan and flake-parts return identical outputs 2025-04-02 09:56:28 +02:00
Johannes Kirschbauer
6bc98c14e5 chore(buildClan): set clanInternals.modules to clanInternals.clanModules 2025-04-01 15:36:37 +02:00
Johannes Kirschbauer
ae8e7edac0 feat(clanLib): expose clanInternals.clanLib
This is usefully for:
- As api via python
- for testing clanLib downstream
2025-03-30 17:07:11 +02:00
Johannes Kirschbauer
a867034aae chore(auto-imports): Remove the auto-import feature. There will be a replacement, to make imports explicit" 2025-03-30 15:29:05 +02:00
Johannes Kirschbauer
eac13871c2 fix(eval/tests): distributed-services: don't abort on warn in tests" 2025-03-30 15:29:05 +02:00
Johannes Kirschbauer
b85705ff63 feat(inventory/instances): add service result to nixos machines 2025-03-30 15:29:05 +02:00
Johannes Kirschbauer
50cac33857 fix(auto-imports): disable since this is not needed anymore and causing collision with the new module type 2025-03-29 16:24:48 +01:00
Johannes Kirschbauer
a5a06dc086 feat(clan/services): init adapter function to convert inventory instances into clan.service module configurations 2025-03-29 13:25:19 +01:00
Johannes Kirschbauer
111d55a1bc feat(clan/services): init new clanInternals attribute 'distributedServices' 2025-03-29 13:25:19 +01:00
Jörg Thalheim
ee284a7c60 don't add nixpkgs to nix registry to not conflict with nixpkgs
NixOS is already doing this for us.
2025-03-22 14:45:53 +01:00
Johannes Kirschbauer
fb883e54a6 Inventory: rename internal inventory toplevel attribute to 'inventoryClass' 2025-03-07 12:30:29 +00:00
Johannes Kirschbauer
2d9bf1e3cc inventory: migrate tests 2025-02-04 13:20:15 +07:00
Johannes Kirschbauer
46dd52332a Inventory: refactor build-inventory in more independent parts 2025-02-04 13:20:15 +07:00
Jörg Thalheim
eee6415261 fix infinite recursion 2025-02-03 12:00:47 +01:00
lassulus
02d450b905 clan-cli: add a Flake class with caching 2025-02-02 11:52:36 +00:00