mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 17:31:34 +01:00
resolved: Remove module as it's enabled by default when using networkd
This commit is contained in:
parent
121d7364f7
commit
9ea6397786
7 changed files with 15 additions and 29 deletions
|
|
@ -21,7 +21,6 @@
|
||||||
de.hyprland.enable = true;
|
de.hyprland.enable = true;
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
resolved.enable = true;
|
|
||||||
gc.enable = true;
|
gc.enable = true;
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
geoclue.enable = true;
|
geoclue.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@
|
||||||
de.hyprland.enable = true;
|
de.hyprland.enable = true;
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
resolved.enable = true;
|
|
||||||
gc.enable = true;
|
gc.enable = true;
|
||||||
wlan.enable = true;
|
wlan.enable = true;
|
||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@
|
||||||
tailscaleDomain = config.custom.services.tailscale.domain;
|
tailscaleDomain = config.custom.services.tailscale.domain;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
resolved.enable = true;
|
|
||||||
tailscale = {
|
tailscale = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ssh.enable = true;
|
ssh.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@
|
||||||
tailscaleDomain = config.custom.services.tailscale.domain;
|
tailscaleDomain = config.custom.services.tailscale.domain;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
resolved.enable = true;
|
|
||||||
tailscale = {
|
tailscale = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ssh.enable = true;
|
ssh.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@
|
||||||
sproutedDomain = "sprouted.cloud";
|
sproutedDomain = "sprouted.cloud";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
resolved.enable = true;
|
|
||||||
tailscale = {
|
tailscale = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ssh.enable = true;
|
ssh.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ in
|
||||||
validate = lib.mkEnableOption "";
|
validate = lib.mkEnableOption "";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.validate {
|
config = {
|
||||||
assertions =
|
assertions =
|
||||||
let
|
let
|
||||||
findDuplicatePorts =
|
findDuplicatePorts =
|
||||||
|
|
@ -49,10 +49,9 @@ in
|
||||||
|> lib.concatStrings;
|
|> lib.concatStrings;
|
||||||
|
|
||||||
duplicateTcpPorts = findDuplicatePorts "tcp";
|
duplicateTcpPorts = findDuplicatePorts "tcp";
|
||||||
|
|
||||||
duplicateUdpPorts = findDuplicatePorts "udp";
|
duplicateUdpPorts = findDuplicatePorts "udp";
|
||||||
in
|
in
|
||||||
[
|
lib.mkIf cfg.validate [
|
||||||
{
|
{
|
||||||
assertion = duplicateTcpPorts == { };
|
assertion = duplicateTcpPorts == { };
|
||||||
message = mkErrorMessage duplicateTcpPorts;
|
message = mkErrorMessage duplicateTcpPorts;
|
||||||
|
|
@ -62,5 +61,18 @@ in
|
||||||
message = mkErrorMessage duplicateUdpPorts;
|
message = mkErrorMessage duplicateUdpPorts;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
meta.ports =
|
||||||
|
let
|
||||||
|
resolvedPorts = lib.mkIf config.services.resolved.enable [
|
||||||
|
53
|
||||||
|
5353
|
||||||
|
5355
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
tcp.list = resolvedPorts;
|
||||||
|
udp.list = resolvedPorts;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
{ config, lib, ... }:
|
|
||||||
{
|
|
||||||
options.custom.services.resolved.enable = lib.mkEnableOption "";
|
|
||||||
|
|
||||||
config = lib.mkIf config.custom.services.resolved.enable {
|
|
||||||
meta.ports =
|
|
||||||
let
|
|
||||||
ports = [
|
|
||||||
53
|
|
||||||
5353
|
|
||||||
5355
|
|
||||||
];
|
|
||||||
in
|
|
||||||
{
|
|
||||||
tcp.list = ports;
|
|
||||||
udp.list = ports;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.resolved.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue