Commit Graph

440 Commits

Author SHA1 Message Date
DavHau
06f0e495ce zerotier: improve docs for moons 2024-12-02 15:50:49 +07:00
Aos Dabbagh
df0c18b6a7 fix(networking): Use true instead of "yes" for multicast config
I ran into an issue when I had clan + this module:
ce61f71680/nixos/mixins/mdns.nix (L6)
they both set the same config value, but clan uses "yes" and that module
uses `true`. systemd allows for "yes" or `true` (`man systemd.syntax`),
so I opted to change this to `true`.

Here's the full error:
```
error: The option `systemd.network.networks."99-ethernet-default-dhcp".networkConfig.MulticastDNS' has conflicting definition values:
- In `/nix/store/3yv22nq7rqd0ra30qvzc2d624rwa6h7c-source/nixosModules/clanCore/networking.nix': "yes"
- In `/nix/store/ivjk0r776mxal8v7jamwsrn4yidvg0dv-source/nixos/mixins/mdns.nix': true
Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions.
```
2024-11-30 23:24:17 -05:00
lassulus
8d31a710fe vars password-store: fix secretLocation again :) 2024-11-30 18:01:23 +01:00
lassulus
0afa050ca2 vars password-store: fix secretLocation 2024-11-30 17:24:17 +01:00
DavHau
5c5a87d416 vars: rename: invalidation -> validation 2024-11-29 17:23:31 +07:00
DavHau
fbbfcc0aa5 vars: generate docs for cli and module 2024-11-29 17:23:31 +07:00
lassulus
cdfcc42107 vars: remove dead option 2024-11-28 16:39:01 +01:00
lassulus
0e4f967dad vars: use vars in option descriptions 2024-11-28 16:38:47 +01:00
lassulus
8337a3ec41 vars: remove secretsUploadDirectory from common module 2024-11-28 16:38:06 +01:00
Jörg Thalheim
cd2ea0d735 vars: add name to generators 2024-11-26 15:26:16 +01:00
lassulus
aee27ba441 core password-store: define fileModule only if file is secret 2024-11-25 12:40:51 +01:00
lassulus
448e04a4ef core password-store: set default location to not conflict with facts 2024-11-23 10:38:14 +01:00
lassulus
fe4bf1c815 core password-store: fix secret location 2024-11-22 22:34:09 +01:00
lassulus
53f78d7959 clan-cli password-store: silence move-mount output 2024-11-22 22:34:09 +01:00
DavHau
d4c8b2e4ed vars: implement invalidation mechanism
This adds options `invalidationData` to generators.

`invalidationData` can be used by an author of a generator to signal if a re-generation is required after updating the logic.

Whenever a generator with invalidation data is executed, a hash of that data is stored by the respective public and/or secret backends.

The stored hashes will be checked on future deployments, and a re-generation is triggered whenever a hash doesn't match what's defined in nix.
2024-11-20 16:27:22 +07:00
lassulus
8f0c575425 password-store owner & group support 2024-11-16 01:18:59 +01:00
Qubasa
26730cd662 clan-cli: upload.py -> Replace rsync with native ssh command 2024-11-15 22:03:47 +07:00
lassulus
faf0946c99 cli vars password-store: fix file locations 2024-11-14 12:07:52 +01:00
clan-bot
39a1bb349d Merge pull request 'Inventory/constraints improve observability' (#2400) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-13 13:42:17 +00:00
Johannes Kirschbauer
42d6ad84f8 Assertions: Fixup dont render assertions into docs 2024-11-13 14:30:50 +01:00
Johannes Kirschbauer
3019d7da7e Inventory/assertions: add seperate assertion layer 2024-11-13 13:52:47 +01:00
lassulus
2c66b36931 core vars: remove default for dirs 2024-11-13 13:23:42 +01:00
Johannes Kirschbauer
83e2367b22 Chore: fix export of machines clan schema 2024-11-12 14:46:26 +01:00
Johannes Kirschbauer
9fb6ea2b8a Chore: remove unused clanImports module 2024-11-12 14:46:25 +01:00
Jörg Thalheim
8cede9fda7 waypipe: fix basic eval 2024-11-11 12:52:55 +01:00
Jörg Thalheim
5b4badab10 clanCore/zerotier: quote "or" keyword in attrset 2024-11-08 14:10:23 +00:00
Jörg Thalheim
0a844097db vars: use explicit lib.mkOption function
the error messages where hard to read, when I tried to add a nested
option. Let's make the code easier to understand instead of saving some
characters to type.
2024-10-31 12:10:57 +01:00
Jörg Thalheim
0842b05687 vars: move owner/group to a sops namespace
we want to allow users to use this feature but do not want to use this
option in our own module because it's not supported by password store.
2024-10-31 12:10:57 +01:00
Jörg Thalheim
3f62d5eefd only add gitMinimal for older nix version 2024-10-29 13:53:58 +01:00
Jörg Thalheim
dec610cc03 add nixos-facter to base system 2024-10-29 13:53:46 +01:00
Jörg Thalheim
4af1954abf ruff: enable warning lints 2024-10-23 09:06:02 +00:00
Louis Opter
4effc0c50e vars: add the user and group options on files
This changeset forwards the ownership control options from sops-nix.
2024-10-23 09:05:53 +00:00
Jörg Thalheim
6122839f90 improve terminating processes on error 2024-10-10 17:59:26 +02:00
Jörg Thalheim
0ead8dd879 drop optionsNix 2024-10-09 13:22:06 +02:00
Jörg Thalheim
808abdff0d move nixos-facter imports to clanCore 2024-10-09 11:56:36 +02:00
Jörg Thalheim
a613e391f6 import nixos facter by default 2024-10-09 11:36:03 +02:00
Jörg Thalheim
c3be54047f switch from userborn to sysusers
fixes #2117
2024-10-08 17:51:55 +00:00
Johannes Kirschbauer
db2882dba5 Inventory/interface: optional instances, allow to use modules without inventory 2024-10-02 11:01:06 +02:00
Jörg Thalheim
17dbf07be7 fix zfs latest again 2024-09-24 12:52:53 +02:00
Jörg Thalheim
2b1ab136c7 add nixos-facter to flash installer 2024-09-24 11:38:33 +02:00
DavHau
0a8b7f38a8 vars: implement migration
Migrating generated files from the facts subsystem to the vars subsystem is now possible.

HowTo:
1. declare `clan.core.vars.generators.<generator>.migrateFact = my_service` where `my_service` refers to a service from `clan.core.facts.services`
2. run `clan vers generate your_machine` or `clan machines update your_machine`

Vars will only be migrated for a generator if:
1. The facts service specified via `migrateFact` does exist
2. None of the vars to generate exist yet
3. All public var names exist in the public facts store
4. All secret var names exist in the secret fact store

If the migration is deemed possible, the generator script will not be executed. Instead the files from the public or secret facts store are read and stored into the corresponding vars store
2024-09-19 17:57:03 +02:00
DavHau
6fc27d402b vars: allow setting a default for values 2024-09-17 21:11:38 +02:00
clan-bot
6737f37fdc Merge pull request 'better nixos defaults' (#2106) from better-defaults into main 2024-09-15 13:52:48 +00:00
Jörg Thalheim
138a929485 disable ldso32 stub to save eval time 2024-09-15 15:43:25 +02:00
Jörg Thalheim
71039cd1ac switch to systemd-initrd 2024-09-15 15:43:25 +02:00
Jörg Thalheim
f496e027f6 disable info pages 2024-09-15 15:17:11 +02:00
Jörg Thalheim
3969f63d56 enable zfs settings by default 2024-09-15 12:46:09 +02:00
DavHau
85477d51f6 vars: get rid of meta.json 2024-09-12 16:52:44 +02:00
DavHau
e905407989 vars/sops: load sops info from nix instead of filesystem 2024-09-12 16:30:21 +02:00
a-kenji
6dd1a7395f vars: use correct paths for value accesses
Use correct paths for value accesses of vars under:

- `per-machine`
- `shared`
2024-09-11 19:02:43 +02:00