Commit Graph

323 Commits

Author SHA1 Message Date
DavHau
b14a520b06 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
1585afc8b3 fix users in VM again 2024-08-24 19:19:24 +02:00
DavHau
1a27bfa8a8 Reapply + Fix "vars: fix - upload machines own secrets only"
This reverts commit 0cd29daf88.
2024-08-23 15:42:46 +02:00
DavHau
0cd29daf88 Revert "vars: fix - upload machines own secrets only"
This reverts commit 2a8958f494.
2024-08-21 14:59:05 +02:00
DavHau
2a8958f494 vars: fix - upload machines own secrets only 2024-08-21 14:47:41 +02:00
a-kenji
a13864f202 facts: fix typo 2024-08-20 11:44:29 +00:00
a-kenji
54ad16a9fd 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
6130505177 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
a067895bee bcachefs: use unstable for zfs 2024-08-16 11:04:42 +02:00
Jörg Thalheim
0e3b16578e zerotierone: use our own upgraded zerotierone package in nixos module 2024-08-16 11:04:42 +02:00
Jörg Thalheim
0479f35d81 stop using sysusers inside vm 2024-08-15 17:30:38 +02:00
Johannes Kirschbauer
a4bbdcb010 Clan-core: Rename clanName within Machines 2024-08-06 12:21:46 +02:00
DavHau
b2646aa0fe 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
8fd09b8403 Add build-clan module 2024-08-03 12:05:09 +02:00
DavHau
cc9c828598 vars: introduce share flag 2024-08-03 15:26:53 +07:00
DavHau
2155675fc6 vars: fix bug when computing taarget path for sops 2024-07-29 12:09:59 +00:00
DavHau
a5065a1936 vars/sops: fix loading of vars from directory structure 2024-07-29 18:01:26 +07:00
Qubasa
c6a0cd9398 clan-vm-manager: Fix waypipe regression in nix code 2024-07-23 13:20:02 +02:00
DavHau
5bd20fcf2c vars: add support for password-store 2024-07-23 14:54:18 +07:00
DavHau
9ff076aec1 vars: implement prompts 2024-07-22 20:40:12 +07:00
Jörg Thalheim
a1a36606e4 cleanup deprecated facts options 2024-07-21 18:11:30 +02:00
DavHau
117843021e vars: implement dependencies 2024-07-17 16:42:16 +07:00
Jörg Thalheim
f8a7f0ecb1 vars: remove deprecated nixos options 2024-07-15 20:41:27 +02:00
Johannes Kirschbauer
e54101165f Inventory: generate exact schema for validation & documentation 2024-07-14 13:30:02 +02:00
DavHau
9988fb744c vars: implement sops.defaultGroups 2024-07-11 18:39:29 +07:00
DavHau
d21926db47 vars: implement secret generation 2024-07-11 11:37:17 +07:00
Mic92
3e6c41593d Merge branch 'main' into DavHau-dave 2024-07-09 09:33:11 +00:00
DavHau
3447a98bee vars: implement generating public variables via in_repo 2024-07-09 14:26:56 +07:00
DavHau
4cde2d96be Reapply "clan.core: rename clan.{deployment,networking} -> clan.core.{deployment,networking}"
This reverts commit 9778444706.

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

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
afbd4a984d clan.core: rename clan.{deployment,networking} -> clan.core.{deployment,networking} 2024-07-04 17:05:37 +07:00
DavHau
32f3b3a309 vars: add generator.runtimeInputs 2024-07-04 13:42:25 +07:00
DavHau
208021ee1c reference docs: add missing description fields and enforce it from now on 2024-07-04 13:34:55 +07:00
clan-bot
0a4abd0e46 Merge pull request 'vars: import by default & fix option rendering' (#1690) from DavHau/clan-core:DavHau-dave into main 2024-07-04 06:15:50 +00:00
DavHau
85a9d82132 vars: import by default & fix option rendering 2024-07-04 13:12:29 +07:00
DavHau
a31e70b2ec facts: mention prompt_value in docs for generator.scripts 2024-07-04 12:59:49 +07:00
DavHau
a7d1ea455b vars: add generators.<name>.finalScript 2024-07-02 16:37:31 +07:00
DavHau
d3f31acc5c secrets: add settings, generator submodules, improve tests 2024-07-02 15:38:46 +07:00
DavHau
3a0f591c8c vars: simplify eval tests by using submodule directly 2024-07-02 13:55:00 +07:00
clan-bot
0f95bfd279 Merge pull request 'fix secret generation on macos' (#1669) from fix-macos-deploy into main 2024-06-30 06:25:39 +00:00
Jörg Thalheim
2e2358d850 introduce minifakeroot that also works on macos 2024-06-27 18:53:10 +02:00
Jörg Thalheim
bae0a888c9 make bubblewrap in fact generation optional 2024-06-27 18:23:05 +02:00
DavHau
5668bc561d vars: init
- init eval tests
- init basic interface
2024-06-27 21:09:55 +07:00
Johannes Kirschbauer
9b0e2a87e8 ClanModules: Add docs and api to retrieve metadata 2024-06-25 21:17:01 +02:00
Johannes Kirschbauer
2f8b782a1f Inventory: init module merge & validation logic for inventory 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
c89080deb4 Extend build-clan interface 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
e44b07df66 inventory: rename clan.services 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
afca7ae0cc update inventory implementation 2024-06-25 12:23:29 +00:00
Jörg Thalheim
6086f27263 fix fake-etc build on machines without sandbox
If we have no sandbox enabled or on macos with sandbox enabled, /etc
contains a lot more files than we actually want.
Instead of copying some random files, we now just create those files
ourself.
2024-06-21 17:01:40 +02:00
Jörg Thalheim
ef9ed1ebea clan.core.state: wrap all commands in shell scripts
Otherwise we cannot execute them via ssh and also have nix store
dependencies.
2024-06-19 17:54:46 +02:00