Merge pull request 'Update nixpkgs' (#4821) from update-nixpkgs into main

This commit is contained in:
clan-bot
2025-09-16 14:19:39 +00:00
39 changed files with 60 additions and 85 deletions

View File

@@ -1,4 +1,3 @@
{ ... }:
{ {
_class = "clan.service"; _class = "clan.service";
manifest.name = "clan-core/admin"; manifest.name = "clan-core/admin";

View File

@@ -1,6 +1,6 @@
{ lib, ... }: { ... }:
let let
module = lib.modules.importApply ./default.nix { }; module = ./default.nix;
in in
{ {
clan.modules = { clan.modules = {

View File

@@ -1,6 +1,6 @@
{ lib, ... }: { ... }:
let let
module = lib.modules.importApply ./default.nix { }; module = ./default.nix;
in in
{ {
clan.modules = { clan.modules = {

View File

@@ -1,12 +1,8 @@
{ {
self,
lib,
... ...
}: }:
let let
module = lib.modules.importApply ./default.nix { module = ./default.nix;
inherit (self) packages;
};
in in
{ {
clan.modules.certificates = module; clan.modules.certificates = module;

View File

@@ -1,6 +1,6 @@
{ lib, ... }: { ... }:
let let
module = lib.modules.importApply ./default.nix { }; module = ./default.nix;
in in
{ {
clan.modules = { clan.modules = {

View File

@@ -1,6 +1,6 @@
{ lib, ... }: { ... }:
let let
module = lib.modules.importApply ./default.nix { }; module = ./default.nix;
in in
{ {
clan.modules = { clan.modules = {

View File

@@ -1,6 +1,6 @@
{ lib, ... }: { ... }:
let let
module = lib.modules.importApply ./default.nix { }; module = ./default.nix;
in in
{ {
clan.modules = { clan.modules = {

View File

@@ -1,6 +1,6 @@
{ lib, ... }: { ... }:
{ {
clan.modules = { clan.modules = {
emergency-access = lib.modules.importApply ./default.nix { }; emergency-access = ./default.nix;
}; };
} }

View File

@@ -1,6 +1,6 @@
{ lib, ... }: { ... }:
let let
module = lib.modules.importApply ./default.nix { }; module = ./default.nix;
in in
{ {
clan.modules = { clan.modules = {

View File

@@ -4,7 +4,6 @@
# The test for this module in ./tests/vm/default.nix shows an example of how # The test for this module in ./tests/vm/default.nix shows an example of how
# the service is used. # the service is used.
{ packages }:
{ ... }: { ... }:
{ {
_class = "clan.service"; _class = "clan.service";
@@ -34,20 +33,17 @@
settings, settings,
# The name of this instance of the service # The name of this instance of the service
instanceName,
# The current machine # The current machine
machine,
# All roles of this service, with their assigned machines # All roles of this service, with their assigned machines
roles,
... ...
}: }:
{ {
# Analog to 'perSystem' of flake-parts. # Analog to 'perSystem' of flake-parts.
# For every instance of this service we will add a nixosModule to a morning-machine # For every instance of this service we will add a nixosModule to a morning-machine
nixosModule = nixosModule =
{ config, ... }: { ... }:
{ {
# Interaction examples what you could do here: # Interaction examples what you could do here:
# - Get some settings of this machine # - Get some settings of this machine

View File

@@ -5,9 +5,7 @@
... ...
}: }:
let let
module = lib.modules.importApply ./default.nix { module = ./default.nix;
inherit (self) packages;
};
in in
{ {
clan.modules = { clan.modules = {

View File

@@ -1,6 +1,6 @@
{ lib, ... }: { ... }:
{ {
clan.modules = { clan.modules = {
importer = lib.modules.importApply ./default.nix { }; importer = ./default.nix;
}; };
} }

View File

@@ -31,7 +31,6 @@
{ {
roles, roles,
lib, lib,
settings,
... ...
}: }:
{ {

View File

@@ -1,6 +1,6 @@
{ lib, ... }: { ... }:
let let
module = lib.modules.importApply ./default.nix { }; module = ./default.nix;
in in
{ {
clan.modules = { clan.modules = {

View File

@@ -1,6 +1,6 @@
{ lib, ... }: { ... }:
let let
module = lib.modules.importApply ./default.nix { }; module = ./default.nix;
in in
{ {
clan.modules.localbackup = module; clan.modules.localbackup = module;

View File

@@ -144,7 +144,7 @@
}; };
} }
// lib.mapAttrs' ( // lib.mapAttrs' (
name: user: _name: user:
lib.nameValuePair "matrix-password-${user.name}" { lib.nameValuePair "matrix-password-${user.name}" {
files."matrix-password-${user.name}" = { }; files."matrix-password-${user.name}" = { };
migrateFact = "matrix-password-${user.name}"; migrateFact = "matrix-password-${user.name}";

View File

@@ -1,6 +1,6 @@
{ lib, ... }: { ... }:
let let
module = lib.modules.importApply ./default.nix { }; module = ./default.nix;
in in
{ {
clan.modules.matrix-synapse = module; clan.modules.matrix-synapse = module;

View File

@@ -1,4 +1,3 @@
{ packages }:
{ ... }: { ... }:
{ {
_class = "clan.service"; _class = "clan.service";

View File

@@ -1,12 +1,8 @@
{ {
self,
lib,
... ...
}: }:
let let
module = lib.modules.importApply ./default.nix { module = ./default.nix;
inherit (self) packages;
};
in in
{ {
clan.modules.monitoring = module; clan.modules.monitoring = module;

View File

@@ -1,6 +1,6 @@
{ lib, ... }: { ... }:
let let
module = lib.modules.importApply ./default.nix { }; module = ./default.nix;
in in
{ {
clan.modules = { clan.modules = {

View File

@@ -1,6 +1,6 @@
{ lib, ... }: { ... }:
let let
module = lib.modules.importApply ./default.nix { }; module = ./default.nix;
in in
{ {
clan.modules = { clan.modules = {

View File

@@ -1,6 +1,6 @@
{ lib, ... }: { ... }:
let let
module = lib.modules.importApply ./default.nix { }; module = ./default.nix;
in in
{ {
clan.modules = { clan.modules = {

View File

@@ -5,9 +5,7 @@
... ...
}: }:
let let
module = lib.modules.importApply ./default.nix { module = ./default.nix;
inherit (self) packages;
};
in in
{ {
clan.modules = { clan.modules = {

View File

@@ -11,7 +11,9 @@
pkgs.syncthing pkgs.syncthing
]; ];
script = '' script = ''
syncthing generate --config "$out" export TMPDIR=/tmp
TEMPORARY=$(mktemp -d)
syncthing generate --config "$out" --data "$TEMPORARY"
mv "$out"/key.pem "$out"/key mv "$out"/key.pem "$out"/key
mv "$out"/cert.pem "$out"/cert mv "$out"/cert.pem "$out"/cert
cat "$out"/config.xml | grep -oP '(?<=<device id=")[^"]+' | uniq > "$out"/id cat "$out"/config.xml | grep -oP '(?<=<device id=")[^"]+' | uniq > "$out"/id

View File

@@ -58,7 +58,7 @@
priority = lib.mkDefault 10; priority = lib.mkDefault 10;
# TODO add user space network support to clan-cli # TODO add user space network support to clan-cli
module = "clan_lib.network.tor"; module = "clan_lib.network.tor";
peers = lib.mapAttrs (name: machine: { peers = lib.mapAttrs (name: _machine: {
host.var = { host.var = {
machine = name; machine = name;
generator = "tor_${instanceName}"; generator = "tor_${instanceName}";

View File

@@ -1,6 +1,6 @@
{ lib, ... }: { ... }:
let let
module = lib.modules.importApply ./default.nix { }; module = ./default.nix;
in in
{ {
clan.modules = { clan.modules = {

View File

@@ -1,6 +1,6 @@
{ lib, ... }: { ... }:
let let
module = lib.modules.importApply ./default.nix { }; module = ./default.nix;
in in
{ {
clan.modules.trusted-nix-caches = module; clan.modules.trusted-nix-caches = module;

View File

@@ -1,6 +1,6 @@
{ lib, ... }: { ... }:
let let
module = lib.modules.importApply ./default.nix { }; module = ./default.nix;
in in
{ {
clan.modules.users = module; clan.modules.users = module;

View File

@@ -1,4 +1,3 @@
{ packages }:
{ lib, ... }: { lib, ... }:
let let
inherit (lib) inherit (lib)
@@ -50,7 +49,7 @@ in
ssid_path = ssid_path =
network_name: config.clan.core.vars.generators."wifi.${network_name}".files.network-name.path; network_name: config.clan.core.vars.generators."wifi.${network_name}".files.network-name.path;
secret_generator = name: value: { secret_generator = name: _value: {
name = "wifi.${name}"; name = "wifi.${name}";
value = { value = {
prompts.network-name.type = "line"; prompts.network-name.type = "line";

View File

@@ -1,12 +1,8 @@
{ {
self,
lib,
... ...
}: }:
let let
module = lib.modules.importApply ./default.nix { module = ./default.nix;
inherit (self) packages;
};
in in
{ {
clan.modules.wifi = module; clan.modules.wifi = module;

View File

@@ -1,6 +1,6 @@
{ lib, ... }: { ... }:
let let
module = lib.modules.importApply ./default.nix { }; module = ./default.nix;
in in
{ {
clan.modules.wireguard = module; clan.modules.wireguard = module;

View File

@@ -5,7 +5,7 @@
... ...
}: }:
let let
module = lib.modules.importApply ./default.nix { }; module = ./default.nix;
in in
{ {
clan.modules.zerotier = module; clan.modules.zerotier = module;

View File

@@ -40,8 +40,6 @@
prefix = [ ]; prefix = [ ];
}).config.manifest; }).config.manifest;
loadFile = file: if builtins.pathExists file then builtins.readFile file else "";
settingsModules = module: mapAttrs (_roleName: roleConfig: roleConfig.interface) (getRoles module); settingsModules = module: mapAttrs (_roleName: roleConfig: roleConfig.interface) (getRoles module);
# Map each letter to its capitalized version # Map each letter to its capitalized version
@@ -97,7 +95,7 @@
**${manifest.description}** **${manifest.description}**
${loadFile (module._file + "/../README.md")} ${lib.optionalString (manifest ? readme) manifest.readme}
${ ${
if manifest.categories != [ ] then if manifest.categories != [ ] then

6
flake.lock generated
View File

@@ -115,10 +115,10 @@
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 315532800, "lastModified": 315532800,
"narHash": "sha256-h8Sx4S+/0FpodZji6W9lHzwY5BcuUG85Aj3GfhvGC2o=", "narHash": "sha256-CObjrxTU/Jl3GkNS/QIKYHGymgsB9tglBU8R7ik0cy8=",
"rev": "a650b5d0de99158323597f048667c4d914243224", "rev": "0b96957fb614f693d0cee1bd65fbfc0e610df47f",
"type": "tarball", "type": "tarball",
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre845298.a650b5d0de99/nixexprs.tar.xz" "url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre862129.0b96957fb614/nixexprs.tar.xz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",

View File

@@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
options,
... ...
}: }:
let let

View File

@@ -32,7 +32,7 @@ def get_machine_flash_options() -> FlashOptions:
def list_languages() -> list[str]: def list_languages() -> list[str]:
cmd = nix_build([f"{nixpkgs_source()}#legacyPackages.x86_64-linux.glibcLocales"]) cmd = nix_build([f"{nixpkgs_source()}#glibcLocales"])
result = run(cmd, RunOpts(log=Log.STDERR, error_msg="Failed to find glibc locales")) result = run(cmd, RunOpts(log=Log.STDERR, error_msg="Failed to find glibc locales"))
locale_file = Path(result.stdout.strip()) / "share" / "i18n" / "SUPPORTED" locale_file = Path(result.stdout.strip()) / "share" / "i18n" / "SUPPORTED"
@@ -57,7 +57,7 @@ def list_languages() -> list[str]:
def list_keymaps() -> list[str]: def list_keymaps() -> list[str]:
cmd = nix_build([f"{nixpkgs_source()}#legacyPackages.x86_64-linux.kbd"]) cmd = nix_build([f"{nixpkgs_source()}#kbd.out"])
result = run(cmd, RunOpts(log=Log.STDERR, error_msg="Failed to find kbdinfo")) result = run(cmd, RunOpts(log=Log.STDERR, error_msg="Failed to find kbdinfo"))
keymaps_dir = Path(result.stdout.strip()) / "share" / "keymaps" keymaps_dir = Path(result.stdout.strip()) / "share" / "keymaps"

View File

@@ -249,7 +249,7 @@ def calc_patches(
data_dyn = flatten_data(persisted) data_dyn = flatten_data(persisted)
all_keys = set(data_all) | set(data_all_updated) all_keys = set(data_all) | set(data_all_updated)
patchset = {} patchset: dict[str, Any] = {}
delete_set = find_deleted_paths(all_values, update, parent_key="") delete_set = find_deleted_paths(all_values, update, parent_key="")

View File

@@ -2,6 +2,7 @@ import logging
from dataclasses import dataclass from dataclasses import dataclass
from clan_lib.dirs import clan_templates from clan_lib.dirs import clan_templates
from clan_lib.errors import ClanError
from clan_lib.flake import Flake from clan_lib.flake import Flake
from clan_lib.nix_models.clan import ClanTemplatesType from clan_lib.nix_models.clan import ClanTemplatesType
@@ -35,8 +36,7 @@ def list_templates(flake: Flake | None) -> TemplateList:
builtin_templates = flake.select("clanInternals.templates") builtin_templates = flake.select("clanInternals.templates")
return TemplateList(builtin_templates, custom_templates) return TemplateList(builtin_templates, custom_templates)
except ClanError:
except (AttributeError, KeyError, Exception):
log.debug( log.debug(
"Failed to get templates from clan inputs, " "Failed to get templates from clan inputs, "
"falling back to clan-core builtin templates", "falling back to clan-core builtin templates",

View File

@@ -227,8 +227,8 @@ pythonRuntime.pkgs.buildPythonApplication {
../../nixosModules/clanCore/zerotier/generate.py ../../nixosModules/clanCore/zerotier/generate.py
# needed by flash list tests # needed by flash list tests
nixpkgs.legacyPackages.x86_64-linux.kbd pkgs.kbd
nixpkgs.legacyPackages.x86_64-linux.glibcLocales pkgs.glibcLocales
# Pre-built VMs for impure tests # Pre-built VMs for impure tests
pkgs.stdenv.drvPath pkgs.stdenv.drvPath