Commit Graph

440 Commits

Author SHA1 Message Date
a-kenji
b13ed922b1 Revert "Merge pull request 'machine_id_v2' (#2052) from Qubasa/clan-core:machine_id_v2 into main"
This reverts commit 22a11abfe5, reversing
changes made to 208b71ac0e.
2024-09-10 14:01:12 +02:00
Qubasa
5c975a5eef clanCore: init machineId and diskId v2 2024-09-09 15:51:31 +02:00
Qubasa
2efa096d29 revert machine_id pull request 2024-09-06 21:38:50 +02:00
Qubasa
4171d5ea4e clanCore: init machine_id.nix with clan.core.machine.{id,diskId} 2024-09-06 18:05:40 +02:00
DavHau
dc4fcb7329 vars: new option prompts.<name>.createFile 2024-09-04 15:48:10 +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
DavHau
924f5e41c6 vars: global metadata paths for all store backends
This also changes the paths where sops stores teh secret -> all sops secrets will have to be re-generated
2024-09-03 16:30:01 +02:00
Jörg Thalheim
535a39cff3 Revert "nixosModules,pkgs: remove installer. clanModules: init installer module"
This reverts commit 1090e36cf1.
2024-09-03 07:04:34 +02:00
Qubasa
1090e36cf1 nixosModules,pkgs: remove installer. clanModules: init installer module 2024-09-03 00:25:16 +02:00
Qubasa
e35fd0976a nixosModules: remove unnecessary ./iso and disk-layout, clanModules: fix issue #1349 2024-09-03 00:09:45 +02:00
clan-bot
8760ed89a3 Merge pull request 'Flake: nixos-facter-module with flake: false' (#1986) from hsjobeki/clan-core:hsjobeki-main into main 2024-09-02 12:36:35 +00:00
Johannes Kirschbauer
91ea8b23ca nixos tests: add documentation machine 2024-09-02 14:32:01 +02:00
Jörg Thalheim
e150b37fb8 enable ASYNC, DTZ, YTT and EM lints 2024-09-02 14:07:06 +02:00
DavHau
62ccd0ed4b vars: introduce deploy=true/false for generated files 2024-09-01 14:32:46 +02:00
Johannes Kirschbauer
38991c9bf6 Flake: nixos-facter-module with flake: false 2024-08-28 11:01:07 +02:00
Johannes Kirschbauer
e6f022ef81 Fix: revert remove clanDir default 2024-08-27 14:29:00 +02:00
DavHau
61e1fd7f85 remove clanDir default
The default value for clanDir did not make sense, as it pointed to the directory of the module definition

Also, we should not have a default at this level as all.
2024-08-26 15:41:52 +02:00
Jörg Thalheim
969eb2f16e fix users in VM again 2024-08-24 19:19:24 +02:00
DavHau
f0a3eaca96 Reapply + Fix "vars: fix - upload machines own secrets only"
This reverts commit cb860f9a03.
2024-08-23 15:42:46 +02:00
DavHau
cb860f9a03 Revert "vars: fix - upload machines own secrets only"
This reverts commit 8d61b03f8d.
2024-08-21 14:59:05 +02:00
DavHau
8d61b03f8d vars: fix - upload machines own secrets only 2024-08-21 14:47:41 +02:00
a-kenji
255a2f5800 facts: fix typo 2024-08-20 11:44:29 +00:00
a-kenji
c3a491a8d9 state: remove /home from default state folders
Home should not always be set by default.
In the UI we can suggest it, but it catches a lot of state you might not
want to back up.

The default has been moved to be automatically set by vm's in `vm.nix`.
2024-08-20 10:02:12 +00:00
a-kenji
63b5417c3d vars: fix using vars module with multiple machines
This filters the secrets to only include the secrets managed under `per-machine` and `shared`,
otherwise new deployments will fail, when using the vars module for multiple machines:

```
[vyr] /nix/store/[…]sops-install-secrets: failed to decrypt '/nix/store/[…]/sops/vars/per-machine/draper/garage/admin_token/secret': Error getting data key: 0 successful groups required, got 0
```

This doesn't fix all the edge cases with this approach.
We get a similar error if we deploy shared vars that are not
encrypted for our machine key. This needs to be addressed when
implementing the shared vars functionality.
2024-08-17 14:00:56 +00:00
Jörg Thalheim
f3b63232cd bcachefs: use unstable for zfs 2024-08-16 11:04:42 +02:00
Jörg Thalheim
466c7cb8bd zerotierone: use our own upgraded zerotierone package in nixos module 2024-08-16 11:04:42 +02:00
Jörg Thalheim
b8fe60a4f7 stop using sysusers inside vm 2024-08-15 17:30:38 +02:00
Johannes Kirschbauer
742e0a71b5 Clan-core: Rename clanName within Machines 2024-08-06 12:21:46 +02:00
DavHau
629861d404 tests: improve testing framework for impure vm tests
Also fix computet sops secret paths for vars
2024-08-04 13:40:12 +07:00
Johannes Kirschbauer
8b0212b828 Add build-clan module 2024-08-03 12:05:09 +02:00
DavHau
d1c2f0b622 vars: introduce share flag 2024-08-03 15:26:53 +07:00
DavHau
71df351217 vars: fix bug when computing taarget path for sops 2024-07-29 12:09:59 +00:00
DavHau
395c5cbace vars/sops: fix loading of vars from directory structure 2024-07-29 18:01:26 +07:00
Qubasa
31161322d6 clan-vm-manager: Fix waypipe regression in nix code 2024-07-23 13:20:02 +02:00
DavHau
5105ff14e0 vars: add support for password-store 2024-07-23 14:54:18 +07:00
DavHau
0acf9178c8 vars: implement prompts 2024-07-22 20:40:12 +07:00
Jörg Thalheim
7004d1ea7f cleanup deprecated facts options 2024-07-21 18:11:30 +02:00
DavHau
566c1403c0 vars: implement dependencies 2024-07-17 16:42:16 +07:00
Jörg Thalheim
7d028790d9 vars: remove deprecated nixos options 2024-07-15 20:41:27 +02:00
Johannes Kirschbauer
d49a23b890 Inventory: generate exact schema for validation & documentation 2024-07-14 13:30:02 +02:00
DavHau
053e61e3f0 vars: implement sops.defaultGroups 2024-07-11 18:39:29 +07:00
DavHau
7dbed61079 vars: implement secret generation 2024-07-11 11:37:17 +07:00
Mic92
a3e2b76517 Merge branch 'main' into DavHau-dave 2024-07-09 09:33:11 +00:00
DavHau
941cf9fb9d vars: implement generating public variables via in_repo 2024-07-09 14:26:56 +07:00
DavHau
79d6f8e893 Reapply "clan.core: rename clan.{deployment,networking} -> clan.core.{deployment,networking}"
This reverts commit 71009f80d8.

workaround upstream bug: https://github.com/NixOS/nixpkgs/issues/324802
2024-07-05 19:29:01 +07:00
Jörg Thalheim
71009f80d8 Revert "clan.core: rename clan.{deployment,networking} -> clan.core.{deployment,networking}"
This reverts commit 18b64f2d0b.

The old configuration cannot be updated like this:

eve] error:
[eve]        … while calling the 'head' builtin
[eve]          at /nix/store/5b0hl2dnvr1sawqlkwmsnaiyqz00d34h-source/lib/attrsets.nix:1575:11:
[eve]          1574|         || pred here (elemAt values 1) (head values) then
[eve]          1575|           head values
[eve]              |           ^
[eve]          1576|         else
[eve]
[eve]        … while evaluating the attribute 'value'
[eve]          at /nix/store/5b0hl2dnvr1sawqlkwmsnaiyqz00d34h-source/lib/modules.nix:809:9:
[eve]           808|     in warnDeprecation opt //
[eve]           809|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
[eve]              |         ^
[eve]           810|         inherit (res.defsFinal') highestPrio;
[eve]
[eve]        … while evaluating the option `system.build.toplevel':
[eve]
[eve]        … while evaluating definitions from `/nix/store/5b0hl2dnvr1sawqlkwmsnaiyqz00d34h-source/nixos/modules/system/activation/top-level.nix':
[eve]
[eve]        … while evaluating the option `assertions':
[eve]
[eve]        … while evaluating definitions from `/nix/store/5b0hl2dnvr1sawqlkwmsnaiyqz00d34h-source/nixos/modules/system/boot/systemd.nix':
[eve]
[eve]        … while evaluating the option `systemd.services':
[eve]
[eve]        … while evaluating definitions from `/nix/store/kpzcdgndym0qm1w490mjvk9c2qmz03h5-source/nixosModules/clanCore/zerotier':
[eve]
[eve]        … while evaluating the option `clan.core.networking.zerotier.networkId':
[eve]
[eve]        (stack trace truncated; use '--show-trace' to show the full, detailed trace)
[eve]
[eve]        error: A definition for option `clan.core.networking.zerotier.networkId' is not of type `null or string'. Definition values:
[eve]        - In `/nix/store/kpzcdgndym0qm1w490mjvk9c2qmz03h5-source/nixosModules/clanCore/networking.nix':
[eve]            {
[eve]              _type = "override";
[eve]              content = "267efd4a15b69623";
[eve]              priorit
2024-07-05 11:16:05 +02:00
DavHau
18b64f2d0b clan.core: rename clan.{deployment,networking} -> clan.core.{deployment,networking} 2024-07-04 17:05:37 +07:00
DavHau
10bb3127a1 vars: add generator.runtimeInputs 2024-07-04 13:42:25 +07:00
DavHau
97bc973969 reference docs: add missing description fields and enforce it from now on 2024-07-04 13:34:55 +07:00