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_25-05,
config,
secrets,
...

View file

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

View file

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

View file

@ -9,7 +9,7 @@ let
cfg = config.services.syncthing;
this = config.networking.hostName;
is-managed = var.syncthing.managed ? ${this};
is-managed = lib.hasAttr this var.syncthing.managed;
is-server = this == "roam";
folders = {
@ -61,6 +61,6 @@ in
devices = var.syncthing.devices;
};
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: {
"secrets/syncthing/${client}.age".publicKeys = [ ssh-keys.by-host.root.${client} ];
};
syncthingSercrets = lib.mergeAttrsList (map mkSyncthingSecret syncthingManagedClients);
syncthingSecrets = lib.mergeAttrsList (map mkSyncthingSecret syncthingManagedClients);
in
lib.mergeAttrsList ([
(mkSecrets keys secrets)
(mkSecrets trusted-keys trusted-secrets)
(syncthingSercrets)
(syncthingSecrets)
])