Commit Graph

26 Commits

Author SHA1 Message Date
Michael Hoang
cd0867e402 networking: set targetHost if FQDN is explicitly set 2025-04-23 01:15:13 +10:00
Michael Hoang
5e61a6e41d nixosModules/clanCore: support nix-darwin 2025-04-22 23:14:03 +10:00
Michael Hoang
8b350d4826 networking: don't set targetHost if FQDN is not set
This will change in the future once we finish the networking Clan module
and we'll have a reliable way of addressing every node automagically.
Until then, this will have to do.
2025-04-03 08:43:10 +02:00
Michael Hoang
753b341f8c networking: add a default value for targetHost 2025-03-20 22:45:19 +09:00
Michael Hoang
35455afeb8 nixos/clan: rename setDefaults to enableRecommendedDefaults 2025-03-05 03:37:41 +00:00
Louis Opter
c689c23d0c clan-cli: "fix" ssh option parsing
Calling it fix in double quotes since that's still quite hand-crafted,
but at least you can now specify options with `@` inside them (e.g.
`ProxyJump`) and have it work properly.

Moreover this fixes the syntax for GET-like variables in the networking
clanCore module. Only the fixed syntax is supported since that's what
was tested, and actually parsed in the code.
2025-02-18 21:37:38 +00:00
Michael Hoang
c4f77989fb nixos/clan: add option for opting out of Clan defaults
Also replace `documentation.nixos.enable = false` with
`documentation.doc.enable` to opt out of only `nixos-help` and the HTML
manual but leave `man configuration.nix`.
2025-02-16 21:31:28 +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
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
Jörg Thalheim
751f676079 rework multicast support 2024-04-17 10:57:17 +02:00
Jörg Thalheim
d974da9fee also enable LLMNR 2024-04-10 15:14:30 +00:00
Jörg Thalheim
42b482d572 fix multicast dns for ethernet 2024-04-10 15:14:30 +00:00
Jörg Thalheim
544c618958 enable multicast fore default dhcp network 2024-04-09 13:35:51 +00:00
Jörg Thalheim
184ecbebec drop custom systemd-networkd unit
We no longer use multicast dns. This one doesn't
conflict with nixos-generate-config.
2024-04-09 12:31:57 +02:00
Jörg Thalheim
ede4d3f6e5 re-format with nixfmt 2024-03-17 19:48:49 +01:00
Jörg Thalheim
5afd5baeb2 add requireExplicitUpdate option for mobile devices 2024-02-06 17:55:34 +01:00
Jörg Thalheim
d36aea3f73 move checks if targetHost/buildHost is set to cli 2024-02-06 14:51:44 +01:00
Jörg Thalheim
def7007f3e clanCore: fix deploymentAddress -> targetHost alias 2024-02-06 10:55:07 +01:00
Jörg Thalheim
584299e199 rename deployment address to target address
This is a prepares having a build server for deployment
2024-02-02 16:39:29 +07:00
Jörg Thalheim
e6acf89117 clanCore/networking: allow ping unconditionally 2023-11-15 11:07:03 +01:00
Jörg Thalheim
80b902a924 move resolved configuration to a dummy interface 2023-11-15 11:07:03 +01:00
Jörg Thalheim
6a35f6b26c explicitly set networkd as the default 2023-11-15 07:21:26 +01:00
Jörg Thalheim
0540fb7103 document networking.deploymentAddress 2023-09-22 12:09:53 +02:00
lassulus
8d29d0e69c clan-cli: get deploymentAddress from clan.networking 2023-09-15 12:17:07 +00:00