Fix test-vm flake check & minor improvements

This commit is contained in:
Henri Dohmen 2026-04-04 14:20:30 +02:00
parent 6b46bc4bc2
commit d54e653a2b
5 changed files with 10 additions and 6 deletions

View file

@ -1,6 +1,5 @@
{ {
pkgs, pkgs,
pkgs_25-05,
config, config,
secrets, secrets,
... ...

View file

@ -19,6 +19,12 @@
users.root.hashedPassword = "!"; users.root.hashedPassword = "!";
}; };
fileSystems."/" = {
device = "/dev/vda1";
fsType = "ext4";
};
swapDevices = [ ];
boot = { boot = {
loader = { loader = {
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;

View file

@ -1,6 +1,5 @@
{ {
config, config,
host,
lib, lib,
pkgs, pkgs,
var, var,

View file

@ -9,7 +9,7 @@ let
cfg = config.services.syncthing; cfg = config.services.syncthing;
this = config.networking.hostName; this = config.networking.hostName;
is-managed = var.syncthing.managed ? ${this}; is-managed = lib.hasAttr this var.syncthing.managed;
is-server = this == "roam"; is-server = this == "roam";
folders = { folders = {
@ -61,6 +61,6 @@ in
devices = var.syncthing.devices; devices = var.syncthing.devices;
}; };
key = lib.optionalAttrs is-managed config.age.secrets.syncthing-key.path; key = lib.optionalAttrs is-managed config.age.secrets.syncthing-key.path;
cert = lib.optionalAttrs is-managed "${../pki/syncthing + "/${this}.cert"}"; cert = lib.optionalAttrs is-managed "${../pki/syncthing}/${this}.cert";
}); });
} }

View file

@ -23,10 +23,10 @@ let
mkSyncthingSecret = client: { mkSyncthingSecret = client: {
"secrets/syncthing/${client}.age".publicKeys = [ ssh-keys.by-host.root.${client} ]; "secrets/syncthing/${client}.age".publicKeys = [ ssh-keys.by-host.root.${client} ];
}; };
syncthingSercrets = lib.mergeAttrsList (map mkSyncthingSecret syncthingManagedClients); syncthingSecrets = lib.mergeAttrsList (map mkSyncthingSecret syncthingManagedClients);
in in
lib.mergeAttrsList ([ lib.mergeAttrsList ([
(mkSecrets keys secrets) (mkSecrets keys secrets)
(mkSecrets trusted-keys trusted-secrets) (mkSecrets trusted-keys trusted-secrets)
(syncthingSercrets) (syncthingSecrets)
]) ])