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";
manifest.name = "clan-core/admin";

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -11,7 +11,9 @@
pkgs.syncthing
];
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"/cert.pem "$out"/cert
cat "$out"/config.xml | grep -oP '(?<=<device id=")[^"]+' | uniq > "$out"/id

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,3 @@
{ packages }:
{ lib, ... }:
let
inherit (lib)
@@ -50,7 +49,7 @@ in
ssid_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}";
value = {
prompts.network-name.type = "line";

View File

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

View File

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

View File

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

View File

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

6
flake.lock generated
View File

@@ -115,10 +115,10 @@
"nixpkgs": {
"locked": {
"lastModified": 315532800,
"narHash": "sha256-h8Sx4S+/0FpodZji6W9lHzwY5BcuUG85Aj3GfhvGC2o=",
"rev": "a650b5d0de99158323597f048667c4d914243224",
"narHash": "sha256-CObjrxTU/Jl3GkNS/QIKYHGymgsB9tglBU8R7ik0cy8=",
"rev": "0b96957fb614f693d0cee1bd65fbfc0e610df47f",
"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": {
"type": "tarball",

View File

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

View File

@@ -32,7 +32,7 @@ def get_machine_flash_options() -> FlashOptions:
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"))
locale_file = Path(result.stdout.strip()) / "share" / "i18n" / "SUPPORTED"
@@ -57,7 +57,7 @@ def list_languages() -> 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"))
keymaps_dir = Path(result.stdout.strip()) / "share" / "keymaps"

View File

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

View File

@@ -2,6 +2,7 @@ import logging
from dataclasses import dataclass
from clan_lib.dirs import clan_templates
from clan_lib.errors import ClanError
from clan_lib.flake import Flake
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")
return TemplateList(builtin_templates, custom_templates)
except (AttributeError, KeyError, Exception):
except ClanError:
log.debug(
"Failed to get templates from clan inputs, "
"falling back to clan-core builtin templates",

View File

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