Commit Graph

321 Commits

Author SHA1 Message Date
Qubasa
434e38779e clan-cli: treefmt fix to iwd module 2025-03-07 14:26:37 +01:00
Guilhem Saurel
a135510047 Fix iwd space handling
ref man iwd.network:

> Key-value lines contain a setting key, an equal sign and the value of
> the setting. Whitespace preceding the key, the equal sign or the value,
> is ignored. The key must be a continuous string of alphanumeric and
> underscore characters and minus signs only. The value starts at the
> first non-whitespace character after the first equal sign on the line
> and ends at the end of the line and must be correctly UTF-8-encoded.
> […]
> String values, including file
> paths and hexstrings, are written as is except for five characters that
> may be backslash-escaped: space, \t, \r, \n and backslash itself.
> The latter three must be escaped. A space character must be escaped if
> it is the first character in the value string and is written as \s.

I guess this is what is expected then:
```
$ echo -e "  \t \r \\ "
 \

$ echo -e "  \t \r \\ " | sed "s=\\\=\\\\\\\=g;s=\t=\\\t=g;s=\r=\\\r=g;s=^ =\\\s="
\s \t \r \\
```
2025-03-07 14:26:37 +01:00
Pablo Ovelleiro Corral
66332c1ae6 Add auto-upgrade module 2025-03-04 10:09:37 +01:00
a-kenji
2fd6576c6f clanModules/iwd: Fix conversion link 2025-03-02 20:27:40 -08:00
vdbe
e6c03497a4 clanModules/root-password: don't deploy plain text password 2025-03-02 17:52:03 +01:00
vdbe
f06b756b97 clanModules/machine-id: fix value 2025-03-02 10:41:35 +01:00
a-kenji
6f68e2f3c0 clanModules/zerotier: Fix documentation 2025-02-26 00:41:20 +07:00
a-kenji
01e6204a96 clanModules/mycelium: Remove certain options for compatibility reasons
Remove certain options for compatibility reasons

We want to reintroduce them once we pass in `vars` through the
inventory.
2025-02-19 09:54:00 +00:00
a-kenji
b561675af8 clanModules/syncthing-static-peers: Migrate to vars
Part of the #2511 migration.
2025-02-15 23:34:25 +07:00
a-kenji
70ce6e5bd7 clanModules/garage: Migrate to vars
Part of the #2511 migration.
2025-02-15 11:21:09 +00:00
a-kenji
28e6d70c0d clanModules/state-version: Remove trailing newlines
The state version is now matched against certain regex rules.
We strip possible trailing newlines to improve compatibility.
2025-02-15 16:29:07 +07:00
a-kenji
f6466ead04 clanModules/root-password: Add inventory feature 2025-02-02 10:35:48 +00:00
a-kenji
2fb312ccc1 clanModules/root-password: Add inventory feature 2025-02-02 10:32:58 +00:00
a-kenji
51113eb656 clanModules/root-password: Fix root-password persistence 2025-02-02 16:36:19 +07:00
a-kenji
42e0928b55 clanModules/mycelium: init mycelium
This adds a clanModule for `mycelium`.
`Mycelium` is an IPv6 overlay network written in Rust.
Each node that joins the overlay network will receive an overlay network IP in the 400::/7 range.

An example configuration might look like this in the inventory:

```nix
mycelium.default = {
  roles.peer.machines = [
    "berlin"
    "munich"
  ];
  config = {
    topLevelDomain = "m";
    openFirewall = true;
    addHostedPublicNodes = true;
  };
};
```

This will add the machines named `berlin` and `munich` to the `mycelium` vpn.
And will also set the toplevel domain of the mycelium vpn to `m`, meaning the
machines are now reachable via `berlin.m` and `munich.m`.
2025-01-22 11:56:10 +00:00
DavHau
5ce72dd261 tests: reduce unnecessary rebuilds of several tests
Some test were referring to the whole source code via ${self} which amde them rebuild on every single commit.

This is not mitigated by introduceing `self.filter { include = [...]; }` allowin to a content addressed subset of the source code in tests.
2025-01-17 17:00:18 +07:00
Pablo Ovelleiro Corral
038083bece Migrate borgbackup module to vars 2025-01-16 13:14:24 +01:00
Johannes Kirschbauer
021cb6274f Root-password: remove deprecated default option 2025-01-14 17:28:12 +01:00
Johannes Kirschbauer
10d7078c1e Fixup: improve mkpasswd generator line 2025-01-14 17:19:50 +01:00
Johannes Kirschbauer
be0b9c4e0e Vars: migrate root-password from facts 2025-01-14 17:19:50 +01:00
Jörg Thalheim
9b885f54af matrix-synapse: migrate to vars 2025-01-14 14:16:19 +00:00
DavHau
4a9ae3a45f vars: rename createFile -> persist 2025-01-11 04:19:46 +00:00
Jörg Thalheim
4893827f04 create synapse registration in systemd service instead of systemd.tmpfiles 2025-01-10 12:45:00 +01:00
Qubasa
fe33c69641 clanModules: fix broken dyndns build 2025-01-02 13:20:43 +01:00
Johannes Kirschbauer
db5f934869 Docs: fix all broken anchor references 2024-12-31 15:43:20 +01:00
Johannes Kirschbauer
d46ffe9f4a Chore:_migrate 'machineName' to 'settings.machine.name' 2024-12-31 14:55:50 +01:00
Johannes Kirschbauer
315be52e34 Chore: init settings submdule, move clanDir into settings submodule 2024-12-31 14:18:09 +01:00
Qubasa
52b40797d5 clanModules: migrate dyndns to vars. 2024-12-30 19:27:46 +01:00
Qubasa
4717c46662 clanModules: fix dyndns porkbun support 2024-12-30 18:47:38 +01:00
Jörg Thalheim
be79b5d6aa sshd: don't migrate openssh-rsa keys
we never had a fact for this.
2024-12-25 23:05:57 +01:00
Jörg Thalheim
877f6b1b52 sshd: add option to generate also rsa key 2024-12-25 22:51:53 +01:00
Jörg Thalheim
bf0e3d3642 re-generate ssh certificates when machine name or domains changes 2024-12-25 19:21:51 +00:00
Jörg Thalheim
077f5415b0 borgbackup: use writeShellApplication 2024-12-24 07:29:50 +01:00
Jörg Thalheim
50c52dd099 borgbackup: make restore less verbose 2024-12-24 07:12:54 +01:00
Jörg Thalheim
316478087a borgbackup: avoid broken pipe 2024-12-24 07:12:54 +01:00
Jörg Thalheim
ed11bff94f borgbackup-list: use pipefail 2024-12-24 07:11:00 +01:00
Jörg Thalheim
c0ff99863d borgbackup-list: fix empty backup case 2024-12-24 07:11:00 +01:00
Jörg Thalheim
98125a34b4 clanModules/borgbackup: make backup directory configurable
This is useful if your have external storage for it.
2024-12-19 20:22:49 +01:00
DavHau
f1e03ecdcf refactor: mapAttrsFlatten -> mapAttrsToList 2024-12-16 23:50:27 +07:00
DavHau
6216d83115 wifi: make available for non-inventory use 2024-12-16 22:24:49 +07:00
DavHau
dead3b0f90 clanModules/wifi: make ssid a secret 2024-12-16 19:04:42 +07:00
Jörg Thalheim
cf2033441c no longer use deprecated hardware.opengl 2024-12-11 17:44:09 +00:00
lassulus
c4cb1533a7 postgresql: nix fmt 2024-12-09 12:57:23 +01:00
DavHau
06f0e495ce zerotier: improve docs for moons 2024-12-02 15:50:49 +07:00
DavHau
32332e8460 wifi: init as experimental module 2024-11-28 15:49:23 +07:00
Johannes Kirschbauer
a6b35f70c6 ClanModules/zerotier: simplify nix code 2024-11-26 10:44:06 +00:00
Johannes Kirschbauer
b3164076d5 Docs/modules: seperate out inventory,role specific interface 2024-11-20 11:01:28 +01:00
Johannes Kirschbauer
bb6abd44aa Modules/matter: add more categories 2024-11-19 15:59:23 +00:00
a-kenji
2389e3f73e clanModules: Fix ordering 2024-11-19 14:14:31 +01:00
a-kenji
4b4b3826c8 clanModules/importer: Init importer inventory module
Initialize the `importer` inventory module.
It is a power user module that allows for convenient, flexible,
structured imports for hosts.

It exposes the `extraModules` functionality of the inventory,
without any added configuration.

Closes: #2356
2024-11-19 14:00:57 +01:00