a-kenji 5b5f1975c5 pkgs/cli/lib: Allow clan templates list to function outside a clan
Allow `clan templates list` to function outside a clan.
Currently when bootstrapping a clan and trying to list the templates
it fails as follows:

```
Traceback (most recent call last):
  File "/nix/store/pkrsr8zr90bps1fwrl8n74zbb9g038b8-clan-cli/bin/.clan-wrapped", line 9, in <module>
    sys.exit(main())
             ~~~~^^
  File "/nix/store/pkrsr8zr90bps1fwrl8n74zbb9g038b8-clan-cli/lib/python3.13/site-packages/clan_cli/cli.py", line 516, in main
    args.func(args)
    ~~~~~~~~~^^^^^^
  File "/nix/store/pkrsr8zr90bps1fwrl8n74zbb9g038b8-clan-cli/lib/python3.13/site-packages/clan_cli/templates/list.py", line 11, in list_command
    templates = list_templates(args.flake)
  File "/nix/store/pkrsr8zr90bps1fwrl8n74zbb9g038b8-clan-cli/lib/python3.13/site-packages/clan_lib/templates/__init__.py", line 20, in list_templates
    custom_templates = flake.select("clanInternals.inventoryClass.templatesPerSource")
                       ^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'select'
```

With the change we get the following output:
```
Available 'clan' templates
├── <builtin>
│   ├── default: Initialize a new clan flake
│   ├── flake-parts: Flake-parts
│   └── minimal: for clans managed via (G)UI
Available 'disko' templates
├── <builtin>
│   └── single-disk: A simple ext4 disk with a single partition
Available 'machine' templates
├── <builtin>
│   ├── flash-installer: Initialize a new flash-installer machine
│   └── new-machine: Initialize a new machine
```

Allowing to check for available templates without needing to have a
clan, which improves the bootstrapping experience.
2025-07-25 16:14:43 +02:00
2025-07-15 17:51:36 +00:00
2025-07-24 16:51:57 +02:00
2025-07-24 16:54:49 +02:00
2025-07-24 16:51:57 +02:00
2025-07-24 16:51:57 +02:00
2025-07-22 20:00:49 +00:00
2025-07-24 16:51:57 +02:00

Clan core repository

Welcome to the Clan core repository, the heart of the clan.lol project! This monorepo is the foundation of Clan, a revolutionary open-source project aimed at restoring fun, freedom, and functionality to computing. Here, you'll find all the essential packages, NixOS modules, CLI tools, and tests needed to contribute to and work with the Clan project. Clan leverages the Nix system to ensure reliability, security, and seamless management of digital environments, putting the power back into the hands of users.

Why Clan?

Our mission is simple: to democratize computing by providing tools that empower users, foster innovation, and challenge outdated paradigms. Clan represents our contribution to a future where technology serves humanity, not the other way around. By participating in Clan, you're joining a movement dedicated to creating a secure, user-empowered digital future.

Features of Clan

  • Full-Stack System Deployment: Utilize Clans toolkit alongside Nix's reliability to build and manage systems effortlessly.
  • Overlay Networks: Secure, private communication channels between devices.
  • Virtual Machine Integration: Seamless operation of VM applications within the main operating system.
  • Robust Backup Management: Long-term, self-hosted data preservation.
  • Intuitive Secret Management: Simplified encryption and password management processes.

Getting started with Clan

If you're new to Clan and eager to dive in, start with our quickstart guide and explore the core functionalities that Clan offers:

  • Quickstart Guide: Check out getting started to get up and running with Clan in no time.

Managing secrets

In the Clan ecosystem, security is paramount. Learn how to handle secrets effectively:

  • Secrets Management: Securely manage secrets by consulting Vars.

Contributing to Clan

The Clan project thrives on community contributions. We welcome everyone to contribute and collaborate:

  • Contribution Guidelines: Make a meaningful impact by following the steps in contributing.

Join the revolution

Clan is more than a tool; it's a movement towards a better digital future. By contributing to the Clan project, you're part of changing technology for the better, together.

Community and support

Connect with us and the Clan community for support and discussion:

Languages
Python 55%
Nix 24.6%
TypeScript 18%
CSS 1.6%
Shell 0.4%
Other 0.3%